HomePhabricator

procutil: assign pseudo file object if sys.stdout/stderr is missing

Authored by yuja.

Description

procutil: assign pseudo file object if sys.stdout/stderr is missing

This basically simulates the Python 2 behavior. If libc stdio were used,
these file objects would be available and raise EBADF. There is subtle
difference between py2 and py3, but I think py3 behavior (i.e. exit 255)
is more correct.

"if" conditions are adjust so that they look similar to
dispatch.initstdio().

Details

Committed
yujaDec 18 2020, 6:09 AM
Parents
rHGa1601ff3877c: procutil: introduce pseudo file object that just raises EBADF
Branches
Unknown
Tags
Unknown