News for hackers. Stuff that matters.
Re:fork() can fail by stingraycharles on Thursday August 21, 2014 @12:38AM (#8205953)
When writing test cases in shell, you generally just implement a die() function and execute all commands `foo || die "bar"`
Re:fork() can fail by nitrogen on Thursday August 21, 2014 @12:41AM (#8205957)
If you don't need to specify a custom message, you could also use "set -e" to die automatically on command failure and use "trap ... EXIT" to display some kind of failure message.