From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23837 invoked by alias); 18 Nov 2012 18:22:36 -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: 17410 Received: (qmail 18368 invoked from network); 18 Nov 2012 18:22:33 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121118102223.ZM2903@torch.brasslantern.com> Date: Sun, 18 Nov 2012 10:22:23 -0800 In-reply-to: <20121118023133.GC2500@localhost.localdomain> Comments: In reply to Han Pingtian "Re: jobs -Z will destory environ variables" (Nov 18, 10:31am) References: <20121117085620.GA2500@localhost.localdomain> <121117093646.ZM9645@torch.brasslantern.com> <20121118023133.GC2500@localhost.localdomain> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: jobs -Z will destory environ variables MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 18, 10:31am, Han Pingtian wrote: } Subject: Re: jobs -Z will destory environ variables } } On Sat, Nov 17, 2012 at 09:36:46AM -0800, Bart Schaefer wrote: } > } > Which means it's not directly related to the hackzero code in bin_fg, } > but must instead be related to changes in the handling of the environ } > strings themselves -- probably the introduction of setenv / unsetenv } > for environment management where previously it was always copied to } > new memory space. } } This patch works just fine. Thanks a lot. Thanks for confirming. Point of interest -- I looked up the original code for setproctitle(), which the BSD manual page says was stolen from sendmail 8.7.3 (well, strictly speaking I looked at 8.13 which I happen to have handy), and found that sm_setproctitle() is doing exactly the same thing as zsh's "hackzero" trick, including shifting the environment to new memory so there's more space for the process title to work with. 8.7.3 is from 1995, so I'm pretty sure zsh's use of this trick predates that in sendmail by 2 or 3 years. I wonder where it came from before that ... or if sendmail got it from zsh.