diff options
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 '%25252525252525253fid%25252525252525253d273db5ceaf392e68c2faf8f7dec14ea2e25e980d%252525252525253fid%252525252525253d8e310303903792c010d03c046ba75f8b18f7d3a7%2525252525253fid%2525252525253d2f6e597ed871cff91c627850d03152cae5f45779%25252525253fid%25252525253d2f6e597ed871cff91c627850d03152cae5f45779%252525253fid%252525253d2f6e597ed871cff91c627850d03152cae5f45779&id2%252525253d1d3142da968da7f6f61f1c1708f39ca233eda150%2525253fid%2525253d2f6e597ed871cff91c627850d03152cae5f45779%25253fid%25253d2f6e597ed871cff91c627850d03152cae5f45779%253fid%253d2f6e597ed871cff91c627850d03152cae5f45779%3fid%3d1d3142da968da7f6f61f1c1708f39ca233eda150?id=1d3142da968da7f6f61f1c1708f39ca233eda150')
0 files changed, 0 insertions, 0 deletions