From owner-freebsd-hackers Sun Sep 5 22:48:32 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from asteroid.svib.ru (asteroid.svib.ru [195.151.166.145]) by hub.freebsd.org (Postfix) with ESMTP id 58ADD14CF7; Sun, 5 Sep 1999 22:48:21 -0700 (PDT) (envelope-from tarkhil@asteroid.svib.ru) Received: from shuttle.svib.ru ([212.46.6.124]) by asteroid.svib.ru (8.9.3/8.9.3) with ESMTP id JAA45448; Mon, 6 Sep 1999 09:47:33 +0400 (MSD) (envelope-from tarkhil@asteroid.svib.ru) Received: (from tarkhil@localhost) by shuttle.svib.ru (8.9.3/8.8.8) id JAA29146; Mon, 6 Sep 1999 09:47:32 +0400 (MSD) (envelope-from tarkhil) Date: Mon, 6 Sep 1999 09:47:32 +0400 (MSD) Message-Id: <199909060547.JAA29146@shuttle.svib.ru> From: Alex Povolotsky To: stable@freebsd.org Cc: hackers@freebsd.org Subject: Problems with FIFO open in non-blocking mode? X-URL: http://freebsd.svib.ru Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! The following program #include #include main() { int control; if ((control = open("STATUS",O_WRONLY|O_NONBLOCK))<0) { perror("Could not open STATUS "); exit(1); } printf("STATUS ready\n"); close(control); return(0); } fails to run (STATUS is pre-created FIFO file) with error "Device not configured", which seems kinda odd for me. However, when FIFO is opened with O_RDWR and O_NONBLOCK, every attempt to select(2) its handler for writing doesn't wait until someone opens FIFO for reading, but instead FIFO is ready to write at every select. Is it a bug or a feature? -- Alexander B. Povolotsky [ICQ 18277558] [2:5020/145] [http://freebsd.svib.ru] [tarkhil@asteroid.svib.ru] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message