[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Path and argument problem... solution?
From: |
Christian Hopp |
Subject: |
Re: Path and argument problem... solution? |
Date: |
Fri, 30 Aug 2002 12:37:11 +0200 (CEST) |
On 30 Aug 2002, Jan-Henrik Haukeland wrote:
>
> I have checked in some new code that can handle up to 64 arguments per
> program. I used your excellent suggestion with flex start condition,
> and it seems to work okay and the code manage to handle the following:
>
> > > start = "/bin/sh -c {
> > > echo $$> /tmp/pid;
> > > /sbin/myserver -x -y -z;
> > > }"
> >
> > start = "/bin/foo --message 'Monit Rulez!'"
> > start = "/bin/foo --message 'I like LaTeX umlaute "a "o "u'"
> > start = "/bin/foo\ bar"
>
>
> > Later... I can try to tidy up the language a bit.
>
> I have tried to cleanup the lexer and the parser and it looks a bit
> better now, at least the lexer. If you have other ideas for cleaning
> up it is most welcome.
Just little things...
1) Beautification... I try to give lonesome quotes comments with
quotes to fix syntax highlighting. (status->done)
2) I think we should use my string quote trimmer to have the
possibility to use double quotes in single quoted strings. (second
example above) (status->done)
3) We should capture escaped chars (at least the important ones): "\t",
"\n", "\ ". (status->not yet done)
4) We should add a possibility to a some kind of variables like
"$pid", "$service", "$checksum", ... in first I thought of using
an environment variable for it but there is no execve, just execle.
And that would be a not so nice hack. An other possibility would
be to substitute the variables at start time. (status->wish)
> Another thing. The spawn command for starting programs from monit
> should send an alert message when it fails to execute a program.
>
> Because we need to free memory before the execv it's not easy to do
> this nice. For now I have changed the function's signature to take a
> Process_T object as well as a Command_T object. The idea is that the
> mailinglist in the Process_T object can be used to send an alert mail
> if spawn (i.e. execv) fails to start a program. I have to think a bit
> more on how to do this and any suggestions are welcome!
Return it as a wait to the fork and do the exit after a timeout?
> BTW, since we collect the load average and other statistics it could
> maybe be nice to display the current values in the runtime and process
> in the web interface, or what do you think?
Acknowledged => put to todo!
> Finally, on the side note, I have started to subscribe to a new coding
> style for if(), while(), for() and such statements. So now, instead of
> writing
>
> if ( expr ) or for ( expr )
>
> I have started to write
>
> if(expr) and for(expr)
>
> Just a fyi :)
I have tried my best to adept your style guide... but I became a
programmer of a language which does not need this puny
brackets... python. (-:
Christian
--
Christian Hopp email: address@hidden
Institut für Elektrische Informationstechnik fon: +49-5323-72-2113
Technische Universität Clausthal fax: +49-5323-72-3197
pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/chopp.key.asc (2001-11-22)
- Path and argument problem... solution?, Christian Hopp, 2002/08/27
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/28
- Re: Path and argument problem... solution?, Christian Hopp, 2002/08/29
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/29
- Re: Path and argument problem... solution?,
Christian Hopp <=
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/30
- Re: Path and argument problem... solution?, Christian Hopp, 2002/08/30
- Re: Path and argument problem... solution?, Christian Hopp, 2002/08/30
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/30
- Re: Path and argument problem... solution?, Christian Hopp, 2002/08/30
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/30
- Re: Path and argument problem... solution?, Rory Toma, 2002/08/30
- Re: Path and argument problem... solution?, Christian Hopp, 2002/08/31
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/31
- Re: Path and argument problem... solution?, Jan-Henrik Haukeland, 2002/08/30