commit cac26b3523e48613745768494a0b83121d00c298
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Dec 29 01:25:30 2024 +0100

    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.

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);
