[PATCH 2/2] sys_cmd error handling improved in the following ways: (1) If the subprocess exits nonzero then the exit status is unpicked and logged. (2) If the exec in the child fails, the command and errno string are written to stderr (which should end up in secnet's usual log output). (3) _exit() is used instead of exit(), to avoid any possibility of craziness with stdio/atexit/etc.

Richard Kettlewell rjk at terraraq.org.uk
Mon Jul 11 19:58:57 BST 2011


On 10/07/2011 23:27, Ian Jackson wrote:
> Richard Kettlewell writes ("[PATCH 2/2] sys_cmd error handling improved in the following ways: (1) If the subprocess exits nonzero then the exit status is unpicked and logged. (2) If the exec in the child fails, the command and errno string are written to stderr (which should end up in secnet's usual log output). (3) _exit() is used instead of exit(), to avoid any possibility of craziness with stdio/atexit/etc."):
>> From: Richard Kettlewell<rjk at greenend.org.uk>
>
> The substance looks good to me.
>
> You should probably try to keep to theh existing coding style though:
> whitespace in "if (" was the thing that jumped out at me.

OK, corrected & pushed.

> We should have sys_vcmd I guess but perhaps not now.
>
> If you want to push your "packet cannot be delivered" despite the lack
> of tv_now, go ahead.  I'll produce the tv_now patch RSN now honest, ahm.

Modified to use the global and pushed.

ttfn/rjk




More information about the sgo-software-discuss mailing list