delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/06/06:03:20

X-Spam-Check-By: sourceware.org
Message-ID: <BAY13-F13FAC443780C07CAFE7733A9130@phx.gbl>
X-Sender: sbremal AT hotmail DOT com
From: "B. S." <sbremal AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: bash + defunct processes
Date: Fri, 06 Oct 2006 08:48:12 +0000
Mime-Version: 1.0
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

Hi,

For a few days I have been struggling with bash scripts leaving defunct 
processes behind. The scripts are kicked off from crontab and are running in 
the background.

$ ps
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
     1744    4384    1688       1744    ? 156894 18:26:16 <defunct>
     1224    1960    1736       3228    ? 156894 18:26:16 <defunct>
     4212       1    4212       4212  con 156894 18:26:31 /usr/bin/bash
     4488    4992    3480       8056    ? 156894 18:27:14 <defunct>
     8968    3340    6548       3968    ? 156894 18:28:15 <defunct>
     7112    8624    1872       5492    ? 156894 18:39:16 <defunct>
     9152    5048    9700       1980    ? 156894 18:38:35 <defunct>
      320    4212     320       3556  con 156894 18:46:16 /usr/bin/ps

Funny is that the script gets stuck at various points:

$ more /proc/<xxx>/winexename
C:\cygwin\bin\lynx.exe
C:\cygwin\bin\xmllint.exe
C:\cygwin\bin\rm.exe
C:\cygwin\bin\cp.exe
C:\cygwin\bin\date.exe

For each process there are 4-5 threads, one in state Wait::Executive and 
others in Wait::UserRequest (according to Process Explorer).

Have you got any idea what goes wrong?

(On top of this writing an automatic script to regularly clean up zombie 
processes is not straightforward since ps returns process IDs which are not 
accepted by kill...)

Any help is highly appreciated.

Cheers,
Balazs

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


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