The original decision to use STDERR to pass JSON messages from child processes to the parent process has been somewhat problematic.
It was working well in previous cases before we added support for arbitrary binaries. Main issue is that it's valid for developers to use STDERR to display non-critical logging messages. We were previously treating any non-json output from STDERR as an actual error to be piped directly back to the client. This isn't ideal, as STDERR messages should always be sent to a separate logging endpoint. Related: #34
The breaking point for this came during testing of a new patch for hook.io which needs to call a well-known linux binary that consistently writes debugging information to STDERR.
This PR includes changes which move all JSON communication from child to parent process onto File Descriptor 3 ( which I believe is OK to do ).
@pyhedgehog - Could you please review the changes which were made to python and python-wsgi support? I think I've pretty much got it working again, but we may want to change some of the API semantics.
The original decision to use STDERR to pass JSON messages from child processes to the parent process has been somewhat problematic.
It was working well in previous cases before we added support for arbitrary binaries. Main issue is that it's valid for developers to use
STDERR
to display non-critical logging messages. We were previously treating any non-json output fromSTDERR
as an actual error to be piped directly back to the client. This isn't ideal, asSTDERR
messages should always be sent to a separate logging endpoint. Related: #34The breaking point for this came during testing of a new patch for hook.io which needs to call a well-known linux binary that consistently writes debugging information to
STDERR
.This PR includes changes which move all JSON communication from child to parent process onto File Descriptor 3 ( which I believe is OK to do ).
@pyhedgehog - Could you please review the changes which were made to
python
andpython-wsgi
support? I think I've pretty much got it working again, but we may want to change some of the API semantics.