opnsense-src/tools/regression/bin/sh/execution/bg3.0
Jilles Tjoelker 03b3a844d0 sh: Set $? to 0 for background commands.
For backgrounded pipelines and subshells, the previous value of $? was being
preserved, which is incorrect.

For backgrounded simple commands containing a command substitution, the
status of the last command substitution was returned instead of 0.

If fork() fails, this is an error.
2011-04-25 20:54:12 +00:00

5 lines
40 B
Text

# $FreeBSD$
f() { return 42; }
f
(:) &