X-Spam-Check-By: sourceware.org Message-ID: <4521AE57.9020007@cygwin.com> Date: Mon, 02 Oct 2006 20:27:03 -0400 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060916 Fedora/1.5.0.7-1.fc4.remi Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.5.21 Forked background processes References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Steve wrote: > 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. 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? -- 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/