summaryrefslogtreecommitdiff
path: root/Xresources
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2021-08-24 06:25:05 +0900
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-05-08 00:28:49 +0200
commitc8a737946ef189fe774af9ee0159b60c0b8a26c4 (patch)
tree6c00c46c7f33f08a37462ed91c6c68c3a0115eae /Xresources
parent79049a9fca3087e13076c4fbd41f4e501497e7e7 (diff)
fix a problem that the standard streams are unexpectedly closed
In the current implementation, the slave PTY (assigned to the variable `s') is always closed after duplicating it to file descriptors of standard streams (0, 1, and 2). However, when the allocated slave PTY `s' is already one of 0, 1, or 2, this causes unexpected closing of a standard stream. The same problem occurs when the file descriptor of the master PTY (the variable `m') is one of 0, 1, or 2. In this patch, the original master PTY (m) is closed before it would be overwritten by duplicated slave PTYs. The original slave PTY (s) is closed only when it is not one of the stanrad streams.
Diffstat (limited to 'Xresources')
0 files changed, 0 insertions, 0 deletions