This is the mail archive of the cygwin mailing list for the Cygwin project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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
Attachment:
cygcheck.out
Description: Binary data
-- 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/
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |