xqms / rosmon

ROS node launcher & monitoring daemon
Other
180 stars 47 forks source link

Use a second PTY for stderr, see #147 #148

Closed xqms closed 3 years ago

xqms commented 3 years ago

This uses a full PTY instead of a pipe for stderr. rospy seems to look at each individual channel (stdout/stderr) to determine whether it should colorize the output - so we have to provide a PTY for both.

This also fixes flushing problems with Python 3 - it seems Python 3 enables buffering separately for stderr if stderr is not connected to a terminal (see #147).