unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: angeloff@acm.org
Subject: Re: [angeloff@acm.org: Emacs bug with Solaris 9 (only)]
Date: Mon, 17 Feb 2003 15:38:14 -0500	[thread overview]
Message-ID: <E18ks1m-0004m9-00@fencepost.gnu.org> (raw)
In-Reply-To: <A8258D78-427A-11D7-AE8A-00039363E640@swipnet.se> (jan.h.d@swipnet.se)

    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.

  reply	other threads:[~2003-02-17 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-15 12:52 [angeloff@acm.org: Emacs bug with Solaris 9 (only)] Jan D.
2003-02-17  7:19 ` Richard Stallman
2003-02-17 13:21   ` Jan D.
2003-02-17 20:38     ` Richard Stallman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-16  5:54 Markus Rost
2003-02-15 21:59 Jan D.
2003-01-23 20:01 Markus Rost
2003-01-23  8:01 Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E18ks1m-0004m9-00@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=angeloff@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).