From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: EMACS_GET_TTY_PGRP vs. emacs_get_tty_pgrp Date: Wed, 20 Oct 2010 10:22:13 -0400 Message-ID: <4CBEFB15.5050303@cornell.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287584622 19151 80.91.229.12 (20 Oct 2010 14:23:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2010 14:23:42 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 16:23:40 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8ZZm-0004Vu-Oo for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 16:23:35 +0200 Original-Received: from localhost ([127.0.0.1]:42949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8ZZl-0002wI-3L for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 10:23:33 -0400 Original-Received: from [140.186.70.92] (port=52472 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8ZZa-0002tO-4T for emacs-devel@gnu.org; Wed, 20 Oct 2010 10:23:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8ZZZ-0003en-70 for emacs-devel@gnu.org; Wed, 20 Oct 2010 10:23:22 -0400 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:43358 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8ZZZ-0003SG-3n for emacs-devel@gnu.org; Wed, 20 Oct 2010 10:23:21 -0400 Original-Received: from [127.0.0.1] (cpe-67-249-196-94.twcny.res.rr.com [67.249.196.94]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id o9KEMd0b005977 for ; Wed, 20 Oct 2010 10:22:39 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 X-Antivirus: avast! (VPS 101020-0, 10/20/2010), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131884 Archived-At: The macro EMACS_GET_TTY_PGRP defined in src/systty.h uses either tcgetpgrp or TIOCGPGRP to get the PGID of a terminal's foreground process group. But src/process.c defines and uses its own emacs_get_tty_pgrp that only works on systems that have TIOCGPGRP. Is there a good reason for this? If not, I would like to try to prepare a patch to change process.c to use the macro instead. This would simplify the code and would also extend some of the functionality in process.c to systems that have tcgetpgrp but not TIOCGPGRP. Ken