[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Emacs bug with Solaris 9 (only)]
From: |
Richard Stallman |
Subject: |
Re: address@hidden: Emacs bug with Solaris 9 (only)] |
Date: |
Mon, 17 Feb 2003 15:38:14 -0500 |
But later at the end of the same function (create_process) we have:
/* vfork succeeded. */
...
XPROCESS (process)->subtty = Qnil;
if (forkin >= 0)
emacs_close (forkin);
This code is really self-contradictory.
I studied the code some more. The idea of subtty seems to be that it
holds the terminal descriptor that the child should use. However, the
code you cite above seems to assume that descriptor needs to be
closed. That code seems to have been present since 1994.
However, in version 1.1 of process.c it looked like this:
#ifdef SYSV4_PTYS
/* OK to close only if it's not a pty. Otherwise we need to leave
it open for ioctl to get pgrp when signals are sent, or to send
the interrupt characters through if that's how we're signalling
subprocesses. Alternately if you are concerned about running out
of file descriptors, you could just save the tty name and open
just to do the ioctl. */
if (NILP (XFASTINT (XPROCESS (process)->pty_flag)))
#endif
{
XPROCESS (process)->subtty = Qnil;
if (forkin >= 0)
close (forkin);
}
It looks like subtty is obsolete. We could delete it,
unless there is some system on which really using it would
solve some problem today.