delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/09/17:50:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <5.1.0.14.2.20020509174850.060aaac8@lnxmain>
X-Sender: roland AT lnxmain
Date: Thu, 09 May 2002 17:48:58 -0400
To: cygwin AT cygwin DOT com
From: Roland Glenn McIntosh <roland AT steeltorch DOT com>
Subject: Re: Processes forking on their own?
Mime-Version: 1.0

Sorry, I should have clarified - for some reason controlling windows close themselves without me touching them.  I have a script which called a batch file.  This batch file has:

        bash --login -c "/usr/local/bin/db.sh start"

and db.sh has something like:
        pg_ctl %1

But everything seems to come up quickly, and die.  Double click batch file, cmd loads bash, which loads script, which loads postmaster.... and then everything goes away, without any interaction from me.
The postmaster.log file shows no issues starting up.  I *don't* believe that this is specifically related to PostgreSQL because I've had other system weirdness, and these scripts work fine for me elsewhere.

But thanks for the info on SIGHUP - I didn't know that.  Anyway, I'm not closing the windows myself.  Actually, I had to add a "while(1) sleep 10" loop to another one of my scripts to keep it from going away and all the processes it starts from going away.

-rgm

At 10:14 PM 05.09.2002 +0100, you wrote:
>> Some of my shell scripts on Windows 2000 Server (NTFS partition) seem to
>be forking their commands.
>> This has the effect of everything in a script trying to run at once, which
>royally screws up dependencies.  This seems to only happen sometimes.  All
>in all, general system behavior is bad.
>Well in a script shells will always use either fork or spawn to launch other
>commands. Do you mean that the shell isn't waiting for the command to
>finish?
>
>>
>> Worse yet and perhaps unrelated: when starting a process which forks
>itself, when the controlling window closes, that process dies too (pg_ctl
>start).  I can't seem to keep my database up unless i avoid using pg_ctl.
>SIGHUP related? If you close the controlling window, SIGHUP will get sent to
>the forked children. If they don't catch the signal, they will die.
>
>Regards
>Chris




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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