zsh-workers
 help / color / mirror / code / Atom feed
* (anon):disown: no current job
@ 2015-02-12  1:52 Daniel Shahaf
  2015-02-12  4:00 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Shahaf @ 2015-02-12  1:52 UTC (permalink / raw)
  To: zsh-workers

$ zsh -f
% cat
^Z
zsh: suspended  cat
% () { bg && disown }    
[1]  - continued  cat
(anon):disown: no current job

It happens with da86d6b4f2c3eef5b1f0860c9dae433f3a540951 (workers/34485)
but not with the commit before that one.

Haven't looked into cause/fix.

Daniel


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

* Re: (anon):disown: no current job
  2015-02-12  1:52 (anon):disown: no current job Daniel Shahaf
@ 2015-02-12  4:00 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2015-02-12  4:00 UTC (permalink / raw)
  To: zsh-workers

On Feb 12,  1:52am, Daniel Shahaf wrote:
}
} $ zsh -f
} % cat
} ^Z
} zsh: suspended  cat
} % () { bg && disown }    
} [1]  - continued  cat
} (anon):disown: no current job

I can reproduce this, with one extra bit:

zsh: suspended  cat
torch% () { bg && disown }
[1]  - continued  cat
(anon):disown: no current job
torch% 
[1]  + suspended (tty input)  cat


} It happens with da86d6b4f2c3eef5b1f0860c9dae433f3a540951 (workers/34485)
} but not with the commit before that one.
} 
} Haven't looked into cause/fix.

Looks like it's related to this (diff here reverts a change):

diff --git a/Src/parse.c b/Src/parse.c
index ffd25de..236789d 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1612,7 +1612,8 @@ par_funcdef(int *cmplx)
 	    num++;
 	    zshlex();
 	}
-	*cmplx = 1;
+	if (num > 0)
+	    *cmplx = 1;
 	ecbuf[parg] = ecused - parg; /*?*/
 	ecbuf[parg+1] = num;
     }


zsh: suspended  cat
torch% () { bg && disown }
[1]  - continued  cat
[1]  + suspended (tty input)  cat
(anon):disown: warning: job is suspended, use `kill -CONT -18480' to resume
torch% 

There's a similar change in par_simple() that may also need to be reversed.

I'm not sure about the exec.c change that moved the "if (do_exec)" block,
but I'm wondering whether it has to do with Ray's mysterious shell exits,
because it makes an _exit() call.


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

end of thread, other threads:[~2015-02-12  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12  1:52 (anon):disown: no current job Daniel Shahaf
2015-02-12  4:00 ` 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).