Problem with 20050106 snapshot

David Rothenberger daveroth@acm.org
Sat Jan 8 23:28:00 GMT 2005


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:

+ ./sleepMingw 30
+ pid=4408
+ trap enTrapSIGINT 2
+ wait
++ enTrapSIGINT
++ echo 'killing process 4408'
killing process 4408
++ kill 4408
./sleepTest.sh: line 11: kill: (4408) - Bad file descriptor
++ exit

The processes end up as <defunct> in procps. Attempts to kill the
processes also result in the Bad file descriptor error.

cygcheck output is also attached. I should note that I'm running
this under WinXP SP2 with hyperthreading enabled. I can try
disabling hyperthreading if requested.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sleepMingw.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050108/a44d6220/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sleepTest.sh
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050108/a44d6220/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050108/a44d6220/attachment-0001.ksh>
-------------- next part --------------

-- 
David Rothenberger                spammer? -> spam@daveroth.dyndns.org
GPG/PGP: 0x7F67E734, C233 365A 25EF 2C5F C8E1 43DF B44F BA26 7F67 E734 


-------------- 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