From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18724 invoked by alias); 13 Feb 2015 10:39:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34529 Received: (qmail 18819 invoked from network); 13 Feb 2015 10:39:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type:in-reply-to; s= mesmtp; bh=l/tUAbC73hjxRJUpyXjasm32PjA=; b=cvXmv51jI10yDGs7e2Rnc 6fczazw0qe4Vgb2sBb/vqB35tLYj4wdC/WEwG6rZ+eps6yalKyWNQtWz1B6+IIj0 HIlJLrj19EunNw77Y3bv8T0MEua1OgLpN4k6258M5EcNlcI/UVwvTY2xx7IVXhHv wDTWaIBI5vsjqMN1hyHCHU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type:in-reply-to; s= smtpout; bh=l/tUAbC73hjxRJUpyXjasm32PjA=; b=cZVBOTxP90ziTALZmVAq wfToITXLzqzg7hIILtM1JGi7SogoAD0EkFq72ivPq9zFDDouAwbkqBHx2i8dqWRd sxp9xuehhlegkw2FvB/A4IO9ARO4qHZVpWswyQdQ54rgbK2epeZv/ltjppJXfLq2 uSUX+ZxRKbqjqgnqQQKV55Y= X-Sasl-enc: mX4Wflnn47eqJKz+Mt7ACwH4u5iX3Yhpc8u5AxOrIbkc 1423823961 Date: Fri, 13 Feb 2015 10:39:19 +0000 From: Daniel Shahaf To: Bart Schaefer Cc: zsh-workers@zsh.org, Soares Chen Subject: Re: Zsh scripts leave defunct processes when running under docker exec Message-ID: <20150213103919.GD1848@tarsus.local2> References: <20150211101130.2ac4d9b5@pwslap01u.europe.root.pri> <150211081345.ZM17542@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150211081345.ZM17542@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) Bart Schaefer wrote on Wed, Feb 11, 2015 at 08:13:45 -0800: > On Feb 11, 10:11am, Peter Stephenson wrote: > } > } If that *is* it, is it just a case of special-casing PID 1 not to do > } "fake" execs? That's not so hard and shouldn't be problematic in other > } cases. > > That would help, but I don't think that's everything, because zsh would > still not reap background grandchildren of children which exited first. > > In fact I don't even know how it *could* do that; we've reached the limit > of my current knowledge of docker / PID namespaces. Note that in the example, it is bash which runs as pid 1, not zsh. The zsh process running the script and the interactive one spawned by 'docker exec' have pid != 1.