#879596 zsh forks when checking syntax

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
Jakub Wilk
Date:
2017-10-23 15:21:11 UTC
Severity:
minor
#879596#3
Date:
2017-10-23 09:27:48 UTC
From:
To:
zsh calls fork() when checking syntax of scripts that use "&":

   $ latrace -I --sym fork -- zsh -n -c 'f&f&f&f'
    5222   fork [/lib/i386-linux-gnu/libc.so.6]
    5222   fork [/lib/i386-linux-gnu/libc.so.6]
    5222   fork [/lib/i386-linux-gnu/libc.so.6]

   zsh finished - exited, status=0

This is weird. Forking is a rather expensive operation, and surely it
should be possible to check syntax without it.