delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/02/22:43:30

X-Spam-Check-By: sourceware.org
Message-ID: <4521CE42.5050509@cygwin.com>
Date: Mon, 02 Oct 2006 22:43:14 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
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: <loom DOT 20061002T215900-610 AT post DOT gmane DOT org> <4521AE57 DOT 9020007 AT cygwin DOT com> <4521CA75 DOT 4040308 AT acm DOT org>
In-Reply-To: <4521CA75.4040308@acm.org>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019