summaryrefslogtreecommitdiffstats
path: root/bin/sh/redir.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/redir.c')
-rw-r--r--bin/sh/redir.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/sh/redir.c b/bin/sh/redir.c
index 695e150..08878f6 100644
--- a/bin/sh/redir.c
+++ b/bin/sh/redir.c
@@ -166,8 +166,11 @@ openredirect(union node *redir, char memory[10])
/*
* We suppress interrupts so that we won't leave open file
- * descriptors around. This may not be such a good idea because
- * an open of a device or a fifo can block indefinitely.
+ * descriptors around. Because the signal handler remains
+ * installed and we do not use system call restart, interrupts
+ * will still abort blocking opens such as fifos (they will fail
+ * with EINTR). There is, however, a race condition if an interrupt
+ * arrives after INTOFF and before open blocks.
*/
INTOFF;
memory[fd] = 0;
OpenPOWER on IntegriCloud