From c285a5ff7665f41684a1f100679b6361ad6383af Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 9 Dec 2016 10:29:55 +0100 Subject: improve sub process handling: return child exit code Wrap the management of the sub process in a new class ForkPty. This reduces the length and number of variables in the main function. Turn it into a context manager to allow closing the masterfd and actually waiting for the forked child (rather than reparenting it to init on exit). This also allows propagating the exit code. Document the new exit semantics. --- tcvt.1 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tcvt.1') diff --git a/tcvt.1 b/tcvt.1 index 8d5af3c..cca5e11 100644 --- a/tcvt.1 +++ b/tcvt.1 @@ -37,6 +37,9 @@ Signal end of options. .El .Pp Any non-option argument signals the end of options for \fBtcvt\fP. +.Sh EXIT STATUS +The exit status of the wrapped program is propagated. +When \fBtcvt\fP produces an error of its own, 255 is returned. .Sh BUGS Not all \fBANSI\fP terminal features are emulated. If you experience rendering issues, you can export the environment variable \fBTCVT_DEVEL\fP. -- cgit v1.2.3