Capture stderr of spawned process

View: New views
1 Messages — Rating Filter:   Alert me  

Capture stderr of spawned process

by Max Lapshin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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]),



________________________________________________________________
erlang-patches mailing list. See http://www.erlang.org/faq.html
erlang-patches (at) erlang.org

0001-capture-stderr-of-spawned-process.patch (21K) Download Attachment