cron allowed to interact with desktop ?
Igor Pechtchanski
pechtcha@cs.nyu.edu
Fri May 9 14:14:00 GMT 2003
Corinna,
While we're at it, two more things (see below).
On Fri, 9 May 2003, Igor Pechtchanski wrote:
> FWIW, the previous patch failed because of a new flag (-Q) in CVS.
This has bitten me in the past, so I'm going to make a suggestion: why not
specify each flag in opts on a separate line, e.g.,
char *opts = "I:"
"R:"
"S:"
"E:"
"p:"
"a:"
"c:"
"e:"
"d:"
"f:"
"o"
"u:"
"w:"
"t:"
"s:"
"y:"
"0:"
"1:"
"2:"
"i"
"h"
"v";
instead of
char *opts = "I:R:S:E:p:a:c:e:d:f:ou:w:t:s:y:0:1:2:ihv";
I know it doesn't look quite as compact (and consumes 2 extra bytes per
option -- the TAB and the NL), but it will ease patching considerably.
And another thing, I noticed there were some string constants in
cygrunsrv.h that had to be kept in sync with the numeric ones. That kinda
rattled my sense of elegance (however much I have of it), so here's a
small patch (attached)...
Igor
==============================================================================
2003-05-09 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* cygrunsrv.h: (STRINGIFY) New macro.
(STRINGIFY_) New helper macro.
(MAX_ENV_STR, MAX_DEPS_STR) Fix redundant string
constants.
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
-- Leto II
-------------- next part --------------
Index: cygrunsrv.h
===================================================================
RCS file: /cvs/cygwin-apps/cygrunsrv/cygrunsrv.h,v
retrieving revision 1.8
diff -u -p -r1.8 cygrunsrv.h
--- cygrunsrv.h 26 Feb 2002 11:22:29 -0000 1.8
+++ cygrunsrv.h 9 May 2003 14:01:44 -0000
@@ -37,11 +37,14 @@
#define DEF_STDIN_PATH "/dev/null"
#define DEF_LOG_PATH "/var/log/"
+#define STRINGIFY_(X) #X
+#define STRINGIFY(X) STRINGIFY_(X)
+
#define MAX_ENV 255
-#define MAX_ENV_STR "255"
+#define MAX_ENV_STR STRINGIFY(MAX_ENV)
#define MAX_DEPS 16
-#define MAX_DEPS_STR "16"
+#define MAX_DEPS_STR STRINGIFY(MAX_DEPS)
extern char *appname;
extern char *svcname;
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list