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

Re: (anon):disown: no current job



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.



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