monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path and argument problem... solution?


From: Jan-Henrik Haukeland
Subject: Re: Path and argument problem... solution?
Date: 30 Aug 2002 01:23:27 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

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.

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!

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?

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 :)

-- 
Jan-Henrik Haukeland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]