X-Spam-Check-By: sourceware.org Message-ID: <4420BF24.2010609@infodev.ca> Date: Tue, 21 Mar 2006 22:06:12 -0500 From: "D.Pageau" User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: signal is not delivered to the handler References: <20060206050928 DOT GA15260 AT trixie DOT casa DOT cgf DOT cx> <441E135B DOT 8020900 AT infodev DOT ca> <20060320135644 DOT GD24528 AT trixie DOT casa DOT cgf DOT cx> In-Reply-To: <20060320135644.GD24528@trixie.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 > If you have a simple test case which illustrates the problem, we'll > certainly investigate. Otherwise, I doubt that anyone is going to debug > lzrz for you. I was wrong, signal is delivred to handler but read() does not exit with EINTR on SIGALRM like Linux and FreeBSD does. Did I miss something ? #include #include #define BUFZ 5 void alarm_handler(int signo) { fprintf(stderr, "SIGNAL: %d\n", signo); } int main() { char buff[BUFSIZ]; FILE *logfp = NULL; siginterrupt(SIGALRM,1); signal(SIGALRM, alarm_handler); alarm(5); fprintf (stderr, "Should timeout by itself in 5 secs\n"); read(0,buff,BUFSIZ); fprintf (stderr, "Timeout\n"); alarm(0); signal(SIGALRM,SIG_DFL); } -- 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/