zsh-workers
 help / color / mirror / code / Atom feed
* Using "source" in a function breaks job control
@ 2015-04-22 18:11 Daniel Hahler
  2015-04-22 20:41 ` Peter Stephenson
  2015-04-22 21:26 ` Peter Stephenson
  0 siblings, 2 replies; 12+ messages in thread
From: Daniel Hahler @ 2015-04-22 18:11 UTC (permalink / raw)
  To: Zsh Hackers' List

-----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-----


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-28 15:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22 18:11 Using "source" in a function breaks job control Daniel Hahler
2015-04-22 20:41 ` Peter Stephenson
2015-04-22 21:26 ` Peter Stephenson
2015-04-23  4:55   ` Bart Schaefer
2015-04-23 20:13     ` Peter Stephenson
2015-04-24  6:22       ` Bart Schaefer
2015-04-24 15:25         ` Peter Stephenson
2015-04-24 15:43           ` Peter Stephenson
2015-04-24 16:21           ` Bart Schaefer
2015-04-27 17:29             ` Peter Stephenson
2015-04-28 10:18             ` Peter Stephenson
2015-04-28 15:57               ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).