From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5569 invoked by alias); 22 Apr 2015 18: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: 34947 Received: (qmail 19734 invoked from network); 22 Apr 2015 18:11:36 -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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-type:content-type:subject :subject:mime-version:user-agent:from:from:date:date:message-id :received:received; s=postfix2; t=1429726289; bh=pDaQmBYqOLKz5wU Eeww9UQJ9tsI/RRfBNnXxOzGMwS4=; b=VIqdHSg73Yae7r0Ber1XwobK2ZteafJ IRWew6f8MbOtP2BzijUXXlNKw72LSL18glAg5SgkqKvxHPigVEAZdPDWA5LD/mB4 Rv5DXTmUupk0Lkqdf2DqDHp8neeVKcin4888pbqeCzzME3XTTM2s9VxbQiiMHMhL HDhjB+l53d/8= Message-ID: <5537E450.9060205@thequod.de> Date: Wed, 22 Apr 2015 20:11:28 +0200 From: Daniel Hahler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Zsh Hackers' List Subject: Using "source" in a function breaks job control Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've noticed that when using "source" (with a file that has at least one expression) in a function, it will cause job control to not work as expected anymore. TEST CASE: 1. echo true > /tmp/foo.zsh 2. vi() { source /tmp/foo.zsh; vim -u NONE -N; } 3. Run "vi" 4. In Vim, press Ctrl-Z to put it into the background. 5. Execute "fg". It should bring back "vim", but does not. OUTPUT: % vi [1] + 23415 running ⎯⎯⎯[~] es:148 (SIGSTOP) jobs:1s % fg [1] + 23415 continued ⎯⎯⎯[~] es:148 (SIGSTOP) % The PID 23415 refers to a "zsh" subprocess: | |-zsh,23316 | | |-vim,23414 -u NONE -N | | `-zsh,23415 Is this behavior expected? Why is there a new subprocess being created? Regards, Daniel. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iD8DBQFVN+RQfAK/hT/mPgARAohaAKDn9uawn58BjsxIhdDTfRG33A7H3QCg+che 6S9jXhz0oMFCzMTr30fY3Ew= =4nNo -----END PGP SIGNATURE-----