X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Thomas Maier-Komor Subject: SIGPOLL and named pipes Date: Sun, 24 Aug 2008 13:47:56 +0200 Lines: 43 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.14 (X11/20080505) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, I don't get SIGPOLL on Cygwin in a software that runs fine on Linux and Solaris. Is there a known issue concerning SIGPOLL and named pipes. The setup code looks like this: Input = open(optarg,O_RDONLY); if (Input == -1) error("could not open input file %s: %s\n",optarg,strerror(errno)); dbug("opening input script %s\n",optarg); ret = fstat(Input, &st); assert(ret != -1); if (S_ISFIFO(st.st_mode)) { dbug("input script is a named pipe\n"); sig.sa_handler = processSignal; sigemptyset(&sig.sa_mask); sigaddset(&sig.sa_mask,SIGPOLL); sig.sa_flags = SA_RESTART; ret = sigaction(SIGPOLL,&sig,0); assert(ret == 0); ret = fcntl(Input,F_SETFL,O_RDONLY|O_NONBLOCK | FASYNC ); assert(ret == 0); InFlags = fcntl(Input,F_GETFL); Script = optarg; } Additionally, there seem to be a bug in Cygwin concerning the concatenation of data written to a named pipe. If I open the named pipe a second time with O_WRONLY, to make sure that there is always one valid open input to the named pipe, the data written to the pipe from different processes doesn't get concatenated and I have to close and reopen the named pipe. This is in contrast to the behavior in Linux and Solaris, and POSIX semantics. Any ideas or pointers? TIA, Thomas -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/