This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 1.5.12: signals stop working after system()
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 2 Mar 2005 20:03:33 -0500
- Subject: Re: 1.5.12: signals stop working after system()
- References: <bccc8ac805030123443f06f102@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
On Wed, Mar 02, 2005 at 02:44:34AM -0500, Jeff Allen wrote:
>Ctrl-C cannot kill my program after it calls system(). It's happening
>in a bigger program that uses UDP, etc. But I can reproduce it in the
>tiny program below.
>
>The following test program shows the problem. You can kill it with
>ctrl-c during the first sleep, but you cannot kill it during the
>second sleep. It will exit correctly after 5 seconds.
>
>#include <stdio.h>
>int main()
>{
> printf("sleeping for 5 secs...\n");
> sleep(5);
> system("echo the hostname is: `hostname`");
> printf("sleeping for 5 secs...\n");
> sleep(5);
>}
>
>I noticed lots of discussion about signals in the archives, but
>nothing related to signals and system().
There actually was some discussion about signals and system because I
fixed a problem with them back in (I think) 2003. I didn't go far
enough in my fix, however. A better solution should be in today's
snapshot: http://cygwin.com/snapshots/ which is uploading right now.
cgf
--
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/