[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.

Ian Jackson ijackson at chiark.greenend.org.uk
Sun Jul 10 23:27:02 BST 2011


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.

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.

Ian.



More information about the sgo-software-discuss mailing list