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

X-Spam-Check-By: sourceware.org
Date: Mon, 02 Oct 2006 19:27:01 -0700
From: David Rothenberger <daveroth AT acm DOT org>
Subject: Re: 1.5.21 Forked background processes
In-reply-to: <4521AE57.9020007@cygwin.com>
To: cygwin AT cygwin DOT com
Message-id: <4521CA75.4040308@acm.org>
MIME-version: 1.0
References: <loom DOT 20061002T215900-610 AT post DOT gmane DOT org> <4521AE57 DOT 9020007 AT cygwin DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

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.

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.

-- 
David Rothenberger                spammer? -> spam AT daveroth DOT dyndns DOT org
GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8

We are MicroSoft.  You will be assimilated.  Resistance is futile.
(Attributed to B.G., Gill Bates)


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