mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Exec module and raw input reader fixes.
- Do stream mode for commands done by exec module, it seems important in some cases (e.g. ensure requested stdin is fully written). - For cases where the raw input reader knows the child process has been reaped, set the childpid member to a sentinel value to indicate such so we don't later think we should kill it or wait on it anymore. - More error checking on dup2/close calls. Set sentinel values when closing ends of pipes to prevent double closing a fd. - Signal flag not set when raw input reader's child exits as a result of a signal. Left out a test for this -- might be portability issues (e.g. Ubuntu seems to do things different regarding the exit code and also is printing "Killed" to stderr where other platforms don't).
This commit is contained in:
parent
1b40412818
commit
1531980f3d
8 changed files with 42 additions and 28 deletions
|
@ -3,5 +3,4 @@ test1, [exit_code=0, signal_exit=F, stdout=[done, exit, stop], stderr=<uninitial
|
|||
[out2] = [insert more text here, and there]
|
||||
}]
|
||||
test2, [exit_code=1, signal_exit=F, stdout=[here's something on stdout, some more stdout, last stdout], stderr=[and some stderr, more stderr, last stderr], files=<uninitialized>]
|
||||
test3, [exit_code=9, signal_exit=F, stdout=[FML], stderr=<uninitialized>, files=<uninitialized>]
|
||||
test4, [exit_code=0, signal_exit=F, stdout=[hibye], stderr=<uninitialized>, files=<uninitialized>]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue