[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#822605: bugs.debian.org: Named pipe (mkfifo) input/output seriously broken, reproducible



Control: reassign -1 bash

These scripts have a race condition, such that this can happen:

Producer       Consumer
--------       --------
open...                    (producer blocks)
               open        (producer unblocked)
               read
write
close
open
               close
write

And fifo(7) says that this write() will result in a SIGPIPE.  So I
don't think there is a kernel bug here.  But it is incorrect that
SIGPIPE terminates the subshell.

When bash runs a builtin command without forking, it should install a
SIGPIPE handler that will cause that signal to abort the command but
not terminate the shell.

Ben.

-- 
Ben Hutchings
All extremists should be taken out and shot.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: