summaryrefslogtreecommitdiff
path: root/tcvt.1
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2016-12-09 10:29:55 +0100
committerHelmut Grohne <helmut@subdivi.de>2016-12-09 10:29:55 +0100
commitc285a5ff7665f41684a1f100679b6361ad6383af (patch)
tree81f46b591cc7ecd856d6696cc9544292b7b8976f /tcvt.1
parentab50ebaf61368c8ffdf4457371c055fb36af7a13 (diff)
downloadtcvt-c285a5ff7665f41684a1f100679b6361ad6383af.tar.gz
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.
Diffstat (limited to 'tcvt.1')
-rw-r--r--tcvt.13
1 files changed, 3 insertions, 0 deletions
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.