Perhaps IPC::Open3? The same as 2, but with error handling.
*update* i'm affraid you're right, it doesn't seem to work like expected...
Using wrong arguments and command, it still returned a proper $pid. The $err remained empty....
Well, while i'm in hunchmode now anyway (i like to see this fixed), could IPC::Cmd help?
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
IPC::Cmd seems to use either IPC::Open3 or IPC::Run
The IPC::Run docs say -
start() pauses the parent until the child executes the
command or CODE reference and propagates any exceptions
thrown (including exec() failure) back to the parent. This
has several pleasant effects: any exceptions thrown in the
child, including exec() failure, come flying out of start()
or run() as though they had ocurred in the parent.
This sounds like what I'm looking for. I'll try it tomorrow and see if lives up to its promises. I would still prefer to do this with a core module if possible and avoid any hassle getting modules installed.