Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: hanging FIFO test



I'm told that in some situations, opening a FIFO read-only
can cause a hang.  I have no idea why.  This should circumvent
the problem.

Index: configure.in
===================================================================
RCS file: /cvs/zsh/zsh/configure.in,v
retrieving revision 1.1.1.60
diff -u -r1.1.1.60 configure.in
--- configure.in	2000/02/14 00:19:18	1.1.1.60
+++ configure.in	2000/02/21 17:46:37
@@ -1140,7 +1140,7 @@
     if(pid < 0)
 	exit(1);
     if(pid) {
-	fd = open("/tmp/fifo$$", O_RDONLY);
+	fd = open("/tmp/fifo$$", O_RDWR);
 	exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
     }
     fd = open("/tmp/fifo$$", O_WRONLY);



Messages sorted by: Reverse Date, Date, Thread, Author