delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/12/07:46:30

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
Date: Wed, 12 Mar 2003 07:46:13 -0500 (EST)
Message-Id: <200303121246.h2CCkDDT006978@skunk.nvs.com>
From: "Richard H. Broberg" <rhb AT inficon DOT com>
To: thorsten AT thorstenkampe DOT de
CC: cygwin AT cygwin DOT com, Richard DOT Broberg AT mail DOT inficon DOT com
In-reply-to: <1hicgmj5xs5fx$.dlg@thorstenkampe.de> (message from Thorsten
Kampe on Tue, 11 Mar 2003 23:43:23 +0100)
Subject: Re: cygwin/1.3.20-1 bash child process disassociation behavior weirdness
References: <200303072147 DOT h27Llr8Q012503 AT skunk DOT nvs DOT com> <038a01c2e4f4$fbd8fc90$78d96f83 AT pomello> <200303072238 DOT h27Mctko020526 AT skunk DOT nvs DOT com> <057301c2e510$7a8c7ce0$78d96f83 AT pomello> <200303101339 DOT h2ADdXEC015644 AT skunk DOT nvs DOT com> <018e01c2e71e$398ecc10$78d96f83 AT pomello> <uk7f57jpo DOT fsf AT world DOT std DOT com> <1hicgmj5xs5fx$.dlg AT thorstenkampe DOT de>

>  Resent-To: Richard DOT Broberg AT mail DOT inficon DOT com
>  Resent-From: rhb AT inficon DOT com
>  Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
>  Sender: cygwin-owner AT cygwin DOT com
>  Mail-Followup-To: cygwin AT cygwin DOT com
>  X-Injected-Via-Gmane: http://gmane.org/
>  From: Thorsten Kampe <thorsten AT thorstenkampe DOT de>
>  Date: Tue, 11 Mar 2003 23:43:23 +0100
[snip]
>  
>  * Francis Litterio (03-03-11 21:03 +0100)
>  > Max Bowsher wrote:
>  >> Richard H. Broberg wrote:
>  >>> In the meantime I'll
>  >>> happily use rxvt in place of bash, since it does what I need.
>  >>
>  >> You are confused.
>  >>
>  >> rxvt is a terminal.
>  >> bash is a shell.
>  > 
>  > Looked at another way:
>  > 
>  > 	rxvt is a GUI application.
>  > 	bash is a console application.
>  
>  Not necessarily. Quoting Igor Pechtchanski: "Cygwin rxvt can run 
>  without X using the W11 library it comes with." - and I think this is 
>  how most people use it under Cygwin.
>  
>  Richard H. Broberg was quite confused: rxvt is a terminal runnig a 
>  shell like bash running applications.
>  

No, I wasn't; in this context I was referring to bash as in
"using the 'bash cygwin shell' shortcut, aka 'bash --login -i'",
which results in a window appearing (yes, it happens to be a console 
window). Running rxvt also causes a window to appear, either on an X 
DISPLAY or as a standalone window.  Running programs in the 
background in the 'bash --login -i' window results in the behavior 
I described.

The end result is that I cannot spawn a bash shell (with --login -i)
which results in a window, put a program nohup in the background, and
exit the window (well, I can, but the window sticks around until
the child process is gone).  And I can do just that in rxvt.

Pedantry and semantics aside, I did some investigation with AllocConsole
and FreeConsole.  Although it seems as though these may be a necessary
component of fixing the problem, it doesn't seem sufficient.  I wrote
a test program which called 'FreeConsole' after it logged something
(so I could be sure it properly ran!), then blocked for 60 seconds.
Running this in a bash window (bash --login -i, aka 'cygwin bash shell')
nohup, input/output redirected, and backgrounded, still didn't let
me exit bash (without blocking).  So even providing that some magic
was done at fork/exec in bash, or in exit() in the library (to ensure
'console' releasing) I think it needs more.

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