occurs; link_required calls cleanup_tty if connect_tty returns
an error, and that does the closing. Doing the closes in connect_tty
meant that the disconnector couldn't run and the tty mode couldn't
be restored.
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RCSID "$Id: tty.c,v 1.22 2004/11/13 12:07:29 paulus Exp $"
+#define RCSID "$Id: tty.c,v 1.23 2004/12/31 11:49:22 paulus Exp $"
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
close(pty_master);
pty_master = -1;
}
close(pty_master);
pty_master = -1;
}
- if (pty_slave >= 0) {
- close(pty_slave);
- pty_slave = -1;
- }
- if (real_ttyfd >= 0) {
- close(real_ttyfd);
- real_ttyfd = -1;
- }
ttyfd = -1;
if (got_sigterm)
asked_to_quit = 1;
ttyfd = -1;
if (got_sigterm)
asked_to_quit = 1;