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] |
On Sat, Jan 08, 2005 at 03:06:21PM -0800, David Rothenberger wrote: Content-Description: message body text >I'm having a problem with the 20050106 snapshot as well as my own >DLL build from CVS HEAD on 20050107. I've also seen these problems >in snapshots from late last year. I've just now isolated a small >test case. > >The problem is with bash killing native processes. I have a bash >script that starts a native process in the background, installs a >signal handler for SIGINT, grabs the pid from the background >process, and then issues wait. The signal handler tries to kill the >pid that was captured. > >With 1.5.12 and a DLL built from CVS on 11/19/2004, this works just >fine. With the latest snapshot, I often (but not always) get a "Bad >file descriptor" error from kill. > >I've enclosed a C file with the source for a simple program that >sleeps for the time specified on the command-line. I compiled this >as a WIN32 application using > > % gcc -o sleepMingw -mno-cygwin sleepMingw.c > >I've also enclosed the driver script sleepTest.sh. > >Here's the output from one run: > I modified the script as attached and ran it for about ten or fifteen minutes and didn't see this behavior but, unless I'm missing something, I don't see how this would ever work reliably, though, since, if you're hitting CTRL-C in a console window, it will be propagated to all subprocesses. Cygwin processes know how to deal with this but mingw processes don't and will just catch the CTRL-C and do what a windows console process would normally do. In this case what they'd normally do is exit. The "file not found" error code is a little odd in this case, though. I tightened up some of the errno setting and will be checking in some new code to deal with some problems that Pierre found with windows processes, soon. The loop I used was: while ./sleepTest.sh 60; do :; done it never exited. cgf
Attachment:
sleepTest.sh
Description: Bourne shell script
-- 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] |