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

Re: Suggested changes to Etc/FAQ



On 2023-11-11 05:10, Bart Schaefer wrote:
@@ -497,8 +504,9 @@ tt(RM_STAR_SILENT),
it() Coprocesses are established by mytt(coproc); mytt(|&) behaves like csh. Handling of coprocess file descriptors is also different. it() In mytt(cmd1 && cmd2 &), only mytt(cmd2) instead of the whole - expression is run in the background in zsh. The manual implies
-        this is a bug.  Use mytt({ cmd1 && cmd2 } &) as a workaround.
+ expression is run in the background in zsh. In versions beginning
+	with 5.9, the whole expression is backgrounded during sh emulation.
+	Use mytt({ cmd1 && cmd2 } &) as a workaround in zsh native mode.
   )
   it() Command line substitutions, globbing etc.:
   itemization(

Unless I'm misunderstanding that statement, that's not what I observe here with zsh 5.9 from the Debian package, nor in the current git HEAD:

$ zsh --emulate sh -c 'sleep 2 && sleep 3 & echo $SECONDS'
2
$ ./Src/zsh --emulate sh -c 'sleep 2 && sleep 3 & echo $SECONDS'
2
$ zsh --version
zsh 5.9 (x86_64-debian-linux-gnu)
$ ./Src/zsh --version
zsh 5.9.0.1-dev (x86_64-pc-linux-gnu)
$ git describe
zsh-5.9-308-gd8a3bff4f


See also https://unix.stackexchange.com/questions/761128/run-two-scripts-after-each-other-in-the-background-and-dont-work/761132#761132

--
Stephane




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