1.5.12: signals stop working after system()
Jeff Allen
jeff.allen@gmail.com
Wed Mar 2 07:44:00 GMT 2005
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().
-jra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 46016 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050302/478dddca/attachment.obj>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list