From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24590 invoked by alias); 13 Mar 2015 04:16:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19998 Received: (qmail 5906 invoked from network); 13 Mar 2015 04:16:09 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to :disposition-notification-to:user-agent; bh=GMceGe6zfPl0bqqEiY8nfY8EICBIm4bb++o0mGT3JYI=; b=Jwi/tNgB4tkh6NRSMJCl2saLrZlHU+x4RKpftu5I8paSCCmQJZTyzPyj3HTs7o0b8i OeTA+McPjUFtnwY3OmkMO4KSFvHv2jEP8H9WfNU/vfAbP9ATMmZPlQ9UhEYAhmYbAB5u C1KcZOG9vk6W7M3s9JgLqc4vzJ1t57oIvMz5Hx1jorJJRBO8t4FGueL2Y08hMe/Xz+we oOgEdC2lQgBddudjxZ73rld3SVo0JWXnrpjQCuCejYl89Zb3IKErciKU+IK6Vpqh5nc/ 073SMZiDPBhPS/Szc2002nKbOzFPTy+noEQXUu2qSz6MPE//BTHW2r7W9C8ajtUNFlN2 x7cQ== X-Received: by 10.66.63.106 with SMTP id f10mr98081135pas.0.1426220167949; Thu, 12 Mar 2015 21:16:07 -0700 (PDT) Date: Fri, 13 Mar 2015 12:15:30 +0800 From: lilydjwg To: zsh-users@zsh.org Subject: Re: DIY ZSH Message-ID: <20150313041530.GA21939@lilyforest> References: <20150312090743.GA23300@lilyforest> <150312205900.ZM16348@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150312205900.ZM16348@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) On Thu, Mar 12, 2015 at 08:59:00PM -0700, Bart Schaefer wrote: > On Mar 12, 5:07pm, lilydjwg wrote: > } > } I've written a simple zsh module to call > } > } prctl(PR_SET_CHILD_SUBREAPER, reaping); > } > } so that orphaned subprocesses won't get adopted by farther processes > } (e.g. init) when the shell is still there. It requires a recent Linux > } kernel. > > This might be of interest to the people who are using zsh with the > Linux PID namespace feature. Would you be interested in sharing? Here it is: https://gist.github.com/lilydjwg/0bfa6807b88e6d39a995 I just copied from the example module and made it build. It adds a "subreap" builtin, with an optional "-u" option to unset the flag. -- Best regards, lilydjwg