Commit 9ffbea75 authored by Bernhard Link's avatar Bernhard Link

fix race condition causing external uncompressors sometimes to catch a sigpipe...

fix race condition causing external uncompressors sometimes to catch a sigpipe if their output is closed before they receive the signal to kill them
parent efa28bb7
2009-02-24
* fix race condition causing external uncompressors sometimes
to catch a sigpipe if their output is closed before they receive
the signal to kill them.
2009-02-23
* log notifiers get variables REPREPRO_CAUSING_RULE and
REPREPRO_FROM set when adding packages via update/pull.
......
......@@ -1060,8 +1060,6 @@ void uncompress_abort(struct compressedfile *file) {
kill(file->pid, SIGTERM);
if( file->infd >= 0 )
(void)close(file->infd);
if( file->fd >= 0 )
(void)close(file->fd);
if( file->pipeinfd != -1 )
(void)close(file->pipeinfd);
do {
......@@ -1073,6 +1071,8 @@ void uncompress_abort(struct compressedfile *file) {
} while( pid == -1 && (e == EINTR || e == EAGAIN) );
if( pid == -1 )
break;
if( file->fd >= 0 )
(void)close(file->fd);
if( WIFEXITED(status) ) {
break;
} else if( WIFSIGNALED(status)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment