From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [angeloff@acm.org: Emacs bug with Solaris 9 (only)] Date: Mon, 17 Feb 2003 02:19:04 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200302151346.h1FDkw3B005865@stubby.bodenonline.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1045466281 8994 80.91.224.249 (17 Feb 2003 07:18:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2003 07:18:01 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18kfXM-0002Kw-00 for ; Mon, 17 Feb 2003 08:18:00 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18kfld-000649-00 for ; Mon, 17 Feb 2003 08:32:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18kfYl-0004DT-01 for emacs-devel@quimby.gnus.org; Mon, 17 Feb 2003 02:19:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18kfYR-0004Ba-00 for emacs-devel@gnu.org; Mon, 17 Feb 2003 02:19:07 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18kfYP-0004BB-00 for emacs-devel@gnu.org; Mon, 17 Feb 2003 02:19:06 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18kfYO-0004B5-00 for emacs-devel@gnu.org; Mon, 17 Feb 2003 02:19:04 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18kfYO-0007TE-00; Mon, 17 Feb 2003 02:19:04 -0500 Original-To: "Jan D." In-reply-to: <200302151346.h1FDkw3B005865@stubby.bodenonline.com> (jan.h.d@swipnet.se) Original-cc: angeloff@acm.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11696 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11696 Now, reading the code it seems to me that p->subtty is unconditionally set to Qnil when the fork of the subprocess succeeds, so the first ioctl will never be executed. Here's the code that sets subtty. /* Record the tty descriptor used in the subprocess. */ if (forkin < 0) XPROCESS (process)->subtty = Qnil; else XSETFASTINT (XPROCESS (process)->subtty, forkin); It doesn't look like this always sets it to nil, unless forkin is always < 0. Basically, it is not SUPPOSED to be always nil, so if you find that it always IS nil, there must be a bug somewhere. The attached patch fixes just one place, a better patch would be to introduce an emacs_get_tty_pgrp or something and call that from these two places. Would you like to do that?