From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24106 invoked by alias); 11 Feb 2015 10:11:41 -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: 34506 Received: (qmail 29550 invoked from network); 11 Feb 2015 10:11:38 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f126d000001e9a-b0-54db2a44437f Date: Wed, 11 Feb 2015 10:11:30 +0000 From: Peter Stephenson To: "zsh-workers@zsh.org" Cc: Soares Chen Subject: Re: Zsh scripts leave defunct processes when running under docker exec Message-id: <20150211101130.2ac4d9b5@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLLMWRmVeSWpSXmKPExsVy+t/xy7ouWrdDDB63alhcuLiUzeJg80Mm ByaPnbPusnusOviBKYApissmJTUnsyy1SN8ugStj4uO/bAW3OSpap6xgb2D8xdbFyMkhIWAi 0b3oNzuELSZx4d56oDgXh5DAUkaJrbseMUM4PUwSkzZPYYdwtjFKrJ+2jQWkhUVAVeLaqfdg NpuAocTUTbMZQWwRAX2Ji39ugdnMAuoSe6Y/YwaxhQX8JV4dncwEYvMK2EvMONcKtppTIFji x7PtTBALZjJKTHg5E6yZH2jQ1b+fmCDus5eYeeUMI0SzoMSPyfdYIBZoSWze1sQKYctLbF7z FmyZENDiG3d3s09gFJ6FpGUWkpZZSFoWMDKvYhRNLU0uKE5KzzXUK07MLS7NS9dLzs/dxAgJ 8i87GBcfszrEKMDBqMTDGzDhZogQa2JZcWXuIUYJDmYlEd4IsdshQrwpiZVVqUX58UWlOanF hxiZODilGhhtfzBm3kzI6j/UU3R2Gatu9bV9L9jPJtW//No5a67YLt1zj59m17+f7iRvpZ6w 30DjVdbdsAkvGzee6l00c/1kZ/kEwUnS21VPJj6fIJH7bdeHDIMsr62qN+67mpgK73p9w3dy vnnWrLB+V8U1Af5zbsl8vnEjS2/JB5nAc4GMD3fMPq5knpOhxFKckWioxVxUnAgAcDfFGVAC AAA= On Tue, 10 Feb 2015 22:53:13 -0800 Bart Schaefer wrote: > I'm not exactly a docker expert, but my understanding is that docker > incorporates (is built on?) the relatively recent Linux feature of "PID > namespaces". Under a PID namespace, the first process started is assigned > PID 1and is expected to behave like the "init" process in a traditional > Unix/Linux system, and be the ultimate manager of all the other processes > spawned within the namespace. > > Zsh is not designed to assume that role. In particular, when processing a > script, it will optimize process handling and perform an implicit "exec" of > the final command in the script, so that it need not hang around waiting > for that process to exit, assuming that it's own parent will reap it. In a > "docker exec" there is no parent to do so. Yeah, another special case we don't have either the bandwidth or the expertise to support... 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. pws