This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Processes forking on their own?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]