Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: jobs -Z will destory environ variables



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.



Messages sorted by: Reverse Date, Date, Thread, Author