aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2021-08-24 06:25:05 +0900
committersinanmohd <pcmsinan@gmail.com>2023-01-12 08:20:21 +0530
commitbc6ba81cbccea13e9593300a644871cd49aa8aa2 (patch)
tree24609ad9c73ed81119c7822ca57cabced0b22ff0 /README
parent3884b30dbde84f49b270265d76d4f0cac73791bd (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 'README')
0 files changed, 0 insertions, 0 deletions