From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10797 invoked by alias); 17 Nov 2012 09:07:03 -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: 17400 Received: (qmail 4239 invoked from network); 17 Nov 2012 09:06:50 -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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Sat, 17 Nov 2012 16:56:20 +0800 From: Han Pingtian To: zsh-user Subject: jobs -Z will destory environ variables Message-ID: <20121117085620.GA2500@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12111708-5806-0000-0000-00001BE327B1 Hi, Looks like "jobs -Z new_name" will destory the environ of current zsh. After running of it, some programs like "less", "vim" won't work correctly: % ls | less WARNING: terminal is not fully functional - (press RETURN) There is no setproctitle() available on linux, bug there is a prctl() which can set proc name to a string which length not big than 16 bytes. I wondering if we can use it instead of modifying argv directly. Thanks.