mirror of
https://repo.or.cz/socat.git
synced 2025-07-13 15:13:23 +00:00
Process last data of failed child process
This commit is contained in:
parent
4bab097ffc
commit
a0e17a813a
4 changed files with 17 additions and 2 deletions
3
socat.c
3
socat.c
|
@ -399,6 +399,9 @@ int main(int argc, const char *argv[]) {
|
|||
Atexit(socat_unlock);
|
||||
|
||||
result = socat(arg1[0], arg1[1]);
|
||||
if (result == EXIT_SUCCESS && engine_result != EXIT_SUCCESS) {
|
||||
result = engine_result; /* a signal handler reports failure */
|
||||
}
|
||||
Notice1("exiting with status %d", result);
|
||||
Exit(result);
|
||||
return 0; /* not reached, just for gcc -Wall */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue