This is the mail archive of the
cygwin
mailing list for the Cygwin project.
1.5.21 Forked background processes
- From: Steve <pooey66 at sbcglobal dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 2 Oct 2006 19:59:13 +0000 (UTC)
- Subject: 1.5.21 Forked background processes
Hello All,
When running as a background process, forking using `backtick` assignments
causes the process to die and leaves the forked process in a defunct state. This
seems like a sever problem with cygwin process handling and I was wandering if
anyone else in this group has ran into this.
Here is an example that will reproduce the problem:
file1.sh:
-----------------------------------------------
#!/usr/bin/bash
./file2.sh &
------------------------------------------------
file2.sh
------------------------------------------------
#!/usr/bin/bash
while [ 1 ]
do
val=`echo $val`
val=$((val + 1))
echo $val
done
------------------------------------------------
After running ./file1.sh, the background process will die very quickly
as seen with 'echo $val' (100 - 150) and leave the forked (backtick) process in
what appears to be in a defunct state. This will still appear as a
process, as seen with 'ps', even though it appears defunct ( check out
link /proc/âpid>/cwd or file /proc/âpid>/cmdline). This does not
happen if I remove the backtick assignment from file2.sh as well.
I've posted this problem in the past and haven't recieved a response. I've seen
this with 1.5.19-4 and 1.5.20.
Thanks for any info,
->Steve
--
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/