Capture stderr of spawned process

Max Lapshin <>
Wed Oct 21 12:55:08 CEST 2009

This is patch, required to catch stderr of spawned process
(tools like x264 print their status to stderr).

bif open_port/2 gets new flag: error  (maybe bad name?). If you pass
it, process will receive messages {error, ErrorData}

Patch made for R13B02-1, not appliable for QNX because I even cannot
imagine, how to test it.

Usage example:

Port = open_port({spawn_executable, Cmd}, [stream, {args, Args},
{line, 1000}, error, exit_status, binary, eof]),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-capture-stderr-of-spawned-process.patch
Type: application/octet-stream
Size: 16383 bytes
Desc: not available
URL: <>

More information about the erlang-patches mailing list