While reading commands from stdin, if job controls are enabled, commands following an asynchronous list in `{ cmd; } &` fashion are executed twice. See below extract:
$ bash -m <<\EOD { sleep 1; } & wait echo $BASHPID EOD 10615 10615 When job controls are disabled, or an external utility is called in the same line this behavior disappears. E.g.: $ bash -m <<\EOD { sleep 1; } & x wait echo $BASHPID EOD ./bash: line 1: x: command not found 10618 This is reproducible on 4.4.20(1)-release, 5.0.11(1)-release and 5.0.16(1)-maint -- Oğuz