diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-29 01:25:30 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-29 01:25:30 +0100 |
commit | cac26b3523e48613745768494a0b83121d00c298 (patch) | |
tree | 1cc69ec77f7c395d9f55fe06279ad8bc7e74f87b | |
parent | dfe3c8728b306091c3f9df0ccd581006922ae378 (diff) | |
download | hurd-cac26b3523e48613745768494a0b83121d00c298.tar.gz hurd-cac26b3523e48613745768494a0b83121d00c298.tar.bz2 hurd-cac26b3523e48613745768494a0b83121d00c298.zip |
fifo: Do not detach pipe when there are still readers
Typically for a control socket we need to be able to connect several
times to it.
This notably fixes the control socket of sv.
-rw-r--r-- | trans/fifo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/trans/fifo.c b/trans/fifo.c index e006dc91..80dab1e2 100644 --- a/trans/fifo.c +++ b/trans/fifo.c @@ -230,9 +230,7 @@ close_hook (struct trivfs_peropen *po) if (was_active) /* See if PIPE should cease to be the user-visible face of this fifo. */ - detach = - ((flags & O_READ) && pipe->readers == 1) - || ((flags & O_WRITE) && pipe->writers == 1); + detach = ((flags & O_READ) && pipe->readers == 1); else /* Let others have their fun. */ pthread_mutex_unlock (&active_fifo_lock); |