From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1227 invoked from network); 13 Dec 1996 02:36:25 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 13 Dec 1996 02:36:25 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA16951; Thu, 12 Dec 1996 21:31:11 -0500 (EST) Resent-Date: Thu, 12 Dec 1996 21:31:11 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199612130230.DAA00677@hzoli.ppp.cs.elte.hu> Subject: fifo configure check To: zsh-workers@math.gatech.edu (Zsh hacking and development) Date: Fri, 13 Dec 1996 03:30:47 +0100 (MET) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"sfJpp2.0.n84.l_Bio"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2569 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I discovered that fifo test fails if zsh is compiled in an NFS mounted directory. The patch below shoud fix it (it's only for configure.in, you need autoconf). I did not test it but it should work. Zoltan *** configure.in 1996/12/05 03:59:45 3.1.0.10 --- configure.in 1996/12/13 02:27:32 *************** *** 656,680 **** { char c; int fd; ! int pid; ! unlink("conftestfifo"); #ifdef HAVE_MKFIFO ! if(mkfifo("conftestfifo", 0600) < 0) #else ! if(mknod("conftestfifo", 0010600, 0) < 0) #endif exit(1); pid = fork(); if(pid < 0) exit(1); if(pid) { ! fd = open("conftestfifo", O_RDONLY); exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x'); } ! fd = open("conftestfifo", O_WRONLY); ! if(fd < 0 || write(fd, "x", 1) < 1) ! kill(getppid(), SIGTERM); ! exit(0); } ], zsh_cv_sys_fifo=yes, --- 656,680 ---- { char c; int fd; ! int pid, ret; ! unlink("/tmp/conftestfifo"); #ifdef HAVE_MKFIFO ! if(mkfifo("/tmp/conftestfifo", 0600) < 0) #else ! if(mknod("/tmp/conftestfifo", 0010600, 0) < 0) #endif exit(1); pid = fork(); if(pid < 0) exit(1); if(pid) { ! fd = open("/tmp/conftestfifo", O_RDONLY); exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x'); } ! fd = open("/tmp/conftestfifo", O_WRONLY); ! ret = (fd < 0 || write(fd, "x", 1) < 1); ! unlink("/tmp/conftestfifo"); ! exit(ret); } ], zsh_cv_sys_fifo=yes,