From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105696 invoked by alias); 24 Jul 2015 14:50:45 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 105686 invoked by uid 89); 24 Jul 2015 14:50:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: lb3-smtp-cloud6.xs4all.net Received: from lb3-smtp-cloud6.xs4all.net (HELO lb3-smtp-cloud6.xs4all.net) (194.109.24.31) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 24 Jul 2015 14:50:43 +0000 Received: from oude-webmail.xs4all.nl ([194.109.26.18]) by smtp-cloud6.xs4all.net with ESMTP id wEqd1q00G0PS7C201EqdNZ; Fri, 24 Jul 2015 16:50:37 +0200 Received: from 83.162.234.136 (SquirrelMail authenticated user incog) by oude-webmail.xs4all.nl with HTTP; Fri, 24 Jul 2015 16:50:37 +0200 Message-ID: <3ed419ccba56059cbd336b192df7d844.squirrel@oude-webmail.xs4all.nl> Date: Fri, 24 Jul 2015 14:50:00 -0000 Subject: Ok, just a request for explanation/clarification then ... From: "Houder" To: cygwin@cygwin.com User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00380.txt.bz2 Hi Corinna, I hesitate to ask ... yes, I am aware you have enough on your plate. If you cannot explain the phenomenon from the top of your head, let it rest, please. In an attempt to understand what needs to be "done" to mintty, I decided to use the "setsid" utility (util-linux) to invoke mintty ... This is what I do: - invoke 'setsid mintty' from bash ... a new window opens - terminate (i.c. exit) bash from the _original_ window There are 2 possibilities to get a bash prompt: 1. 'a dos console (shortcut) in which mintty is started', and 2. 'a dos console in which bash is started' Now in the FIRST case, if bash (the original window) is terminated (i.c. exit), the window does NOT close, as if the 'first mintty' is waiting for bash (which is already a zombie). Termination (i.c. exit) of bash in the SECOND case, does not only terminate bash, but also closes the window !! (as expected) Can you EXPLAIN (first case) why the 'first mintty' does not terminate ????? Is it Cygwin? Is it Window? (explain, i.e. not solve the bug, if it is one) Henri ----- Details: 1. = dos console in which mintty is started PATH (32)= /usr/local/bin:/usr/bin:/drv/c/... Executing .bash_profile Executing .bashrc, $- = himBH, login_shell on @@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 2300 5000 2300 4588 pty0 1000 13:05:11 /usr/bin/ps 4976 1 4976 4976 ? 1000 13:05:02 /usr/bin/mintty-v113 5000 4976 5000 4992 pty0 1000 13:05:02 /usr/bin/bash @@ setsid mintty-v113 # mintty should be able to manage this (i.e. w/o using setsid) @@ exit logout <==== mintty? (parent: explorer) waits ????? (i.e. window does not close) ... what is it waiting for? the zombie bash ????? (that process has gone acc. to Windows) ... No, somehow the processes in the new window prevent the 'first mintty' from terminating ... View by Process Explorer: explorer mintty only option after bash has been terminated, is killing mintty (from the new window: kill -9 4976) bash acc. to Cygwin a child of mintty mintty <==== new window bash ... new window PATH (32)= /usr/local/bin:/usr/bin:/drv/c/WINDOWS/System32:/drv/c/WINDOWS:/drv/c/WINDOWS/System32/Wbem:/home/Henri/bin Executing .bashrc, $- = himBH, login_shell off @@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4976 1 4976 4976 ? 1000 13:05:02 /usr/bin/mintty-v113 ... waiting? for what? (after term. of bash) I 5000 4976 5000 4992 pty0 1000 13:05:02 /usr/bin/bash <==== zombie () after exit 1844 400 1844 812 pty1 1000 13:05:25 /usr/bin/ps 400 2032 400 3848 pty1 1000 13:05:17 /usr/bin/bash 2032 1 2032 4308 ? 1000 13:05:17 /usr/bin/mintty-v113 <==== "new window" @@ # now terminate bash in the original window 2. = dos console in which bash is started PATH (32)= /usr/local/bin:/usr/bin:/drv/c/... Executing .bash_profile Executing .bashrc, $- = himBH, login_shell on @@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4616 4648 4616 4336 cons0 1000 13:33:54 /usr/bin/ps 4648 1 4648 4648 cons0 1000 13:33:51 /usr/bin/bash @@ setsid mintty-v113 @@ exit ... and yes, the window closes (as expected) View by Process Explorer: explorer bash mintty bash acc. to Cygwin a child of mintty ... new window PATH (32)= /usr/local/bin:/usr/bin:/drv/c/WINDOWS/System32:/drv/c/WINDOWS:/drv/c/WINDOWS/System32/Wbem:/home/Henri/bin Executing .bashrc, $- = himBH, login_shell off @@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4152 1 4152 4720 ? 1000 13:34:07 /usr/bin/mintty-v113 I 4648 1 4648 4648 cons0 1000 13:33:51 /usr/bin/bash <==== gone! after exit 796 4152 796 988 pty0 1000 13:34:07 /usr/bin/bash 4484 796 4484 3388 pty0 1000 13:34:14 /usr/bin/ps @@ # now terminate bash in the original window @@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4152 1 4152 4720 ? 1000 13:34:07 /usr/bin/mintty-v113 2644 796 2644 4680 pty0 1000 13:38:01 /usr/bin/ps 796 4152 796 988 pty0 1000 13:34:07 /usr/bin/bash ===== -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple