Commit graph

3 commits

Author SHA1 Message Date
Rom Lemarchand
75c289aab9 logwrap: wait for child process when receiving SIGINT or SIGQUIT
- Wait for the child to exit before propagating SIGINT and SIGQUIT
to the parent
- Add ignore_int_quit argument to logwrap() that gives the caller the
option to ignore SIGINT and SIGQUIT while logwrap is running

Change-Id: If5c96cf23094917211310f00aa6aed515f110f5b
2013-01-29 00:04:50 +00:00
Rom Lemarchand
b58a822955 logwrapper: prevent logwrap from hanging when child dies
Sometimes the read on the PTY can wait indefinitely if the child
dies. By using a poll statement that monitors both the output
of the child and its state we prevent this from happening.

Change-Id: I51d5556c66f039bca673145ca72db262977e1689
2013-01-14 11:11:58 -08:00
Rom Lemarchand
113bd47d61 logwrapper: split into liblogwrap and the executable itself
Abstracting the functionality of logwrapper into a library and making
use of it for the logwrapper executable.

Change-Id: I2bcf722413f3a8454c6f52137dec86c4477fb8b5
2013-01-11 13:58:29 -08:00