summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-09-08 00:39:49 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-09-08 00:39:49 +0200
commitf62819106ede2d407c31d1bd71a4e87c6fe60484 (patch)
treef74247b996c24412184fa8561017a81b3fd33195 /trans
parent7a2c17fcbb789997421725d726340301ef35d84c (diff)
Fix opening a fifo with O_RDWR
We should not wait for a writer in that case, since that will be ourself. * trans/fifo.c (open_hook): Do not wait for a writer when flags contains O_WRITE.
Diffstat (limited to 'trans')
-rw-r--r--trans/fifo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trans/fifo.c b/trans/fifo.c
index a9ad2dd2..f52baba9 100644
--- a/trans/fifo.c
+++ b/trans/fifo.c
@@ -169,7 +169,7 @@ open_hook (struct trivfs_peropen *po)
make us block because we've ensured that there's a reader
for it. */
- if (wait_for_writer)
+ if (wait_for_writer && (!(flags & O_WRITE)))
/* Wait until there's a writer. */
{
WAIT (active_fifo->writers, 0);