Detect exec() failure properly so that NULL is returned to caller.