Skip to content

Commit a53295b

Browse files
committed
Ignore SIGPIPE in qrexec-fork-server too
The process_io() (or more precisely - write_stdin() and write_all()) function relies on write() reporting errors "normally" (negative return value + errno), it is not prepared to handle SIGPIPE signal. If service exits, SIGPIPE sent to the qrexec-fork-server worker process would kill it. The main qrexec-agent process correctly has SIGPIPE handler set to SIG_IGN, but this was missing in qrexec-fork-server. Add it there too. This was found when debugging qrexec performance tests, but looks also similar to this issue: Fixes QubesOS/qubes-issues#5749
1 parent 54b35da commit a53295b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

agent/qrexec-fork-server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ int main(int argc, char **argv) {
138138
exit(0);
139139
}
140140
signal(SIGCHLD, SIG_IGN);
141+
signal(SIGPIPE, SIG_IGN);
141142
register_exec_func(do_exec);
142143

143144
while (1) {

0 commit comments

Comments
 (0)