1
0
Fork 0
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:
Gerhard Rieger 2023-06-15 12:53:32 +02:00
parent 4bab097ffc
commit a0e17a813a
4 changed files with 17 additions and 2 deletions

View file

@ -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 */