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]

Re: 1.5.21 Forked background processes


David Rothenberger wrote:
On 10/2/2006 5:27 PM, Larry Hall (Cygwin) wrote:
Steve wrote:
When running as a background process, forking using `backtick` assignments causes the process to die and leaves the forked process
in a defunct state.
[snip]

Tried with 1.5.21. Ran > 5500 times before I stopped it. ps looks clean to me. Perhaps 1.5.21 will work for you? Maybe a snapshot?

I can easily reproduce this with a self-built DLL from 20060827, but only if I invoke file1.sh from within bash. If I run "bash file1.sh" from a CMD shell, it works fine.


Cool!  So then perhaps the best approach here is to fire up the debugger
and see what you can see. ;-)  Alternatively, you can build a more recent
build and see if you still see the problem.  Then debug from there if so.


Also (perhaps not surprisingly), if I add a wait at the end of file1.sh, it runs fine until I Ctrl-C out of file1. Then, it will eventually hang again.

Once it hung, I tried to kill the process bash process running file2.sh.

% handle file2

Handle v3.01
Copyright (C) 1997-2005 Mark Russinovich
Sysinternals - www.sysinternals.com

bash.exe pid: 5052 C:\temp\cygwin\file2.sh

% /bin/kill -f 5052
kill: couldn't kill pid 1100, 5

% ps -W | grep 1100
     1100       1    6100       1100  con 1003 18:22:59 /usr/bin/bash

I can kill Windows pid 5052 using the Windows Task Manager.



Interesting. I didn't see anything like that myself.


-- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746

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