X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: SZABO Gergely Subject: Re: R: Why mc start without subshell by default? Date: Wed, 3 Nov 2010 12:45:39 +0000 (UTC) Lines: 36 Message-ID: References: <250110 DOT 4409 DOT qm AT web25507 DOT mail DOT ukl DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Marco Atzeri yahoo.it> writes: > > --- Mer 3/11/10, Oleksandr Gavenko ha scritto: > > > I can turn on subshell by: > > > >   $ mc -U > > > > This is useful by default or I miss something? > > > > > > It is useful but there is one problem on cygwin. > When you close mc the subshell will not exit, so you will finish > with a "zombie" bash shell running. > > Marco > > I thought mc's lacking subshell support is a hard fact of life in Cygwin, until the -U option was pointed out here. It's a huge improvement. It's quite easy to kill the zombie subshells. Put a line into /etc/crontab (assuming you're running cron): */6 * * * * SYSTEM ps -a | sed -n 's/I *\([0-9][0-9]*\) *1 *..*bash$/\1/p' | xargs kill -KILL This will kill all bash processes every 6 minutes, who are waiting for input in the background (I) and whose parent process (PPID) is 1 (not a terminal, not mc). Best regards Gergely -- 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