From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1688: 23.0.60; ttname returned by system-process-attributes points to nonexisting file Date: Sun, 18 Jan 2009 15:57:57 -0500 Message-ID: References: <877i5q2ij9.fsf@broken.deisui.org> <496B7B23.9070203@foxmail.com> <49705FD0.6090006@foxmail.com> <4971C65F.9080703@foxmail.com> Reply-To: Stefan Monnier , 1688@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232313828 31036 80.91.229.12 (18 Jan 2009 21:23:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2009 21:23:48 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, ueno@unixuser.org, bug-gnu-emacs@gnu.org, 1688@emacsbugs.donarmstrong.com To: richardeng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 18 22:25:00 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LOf8c-0006TD-Jp for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jan 2009 22:24:59 +0100 Original-Received: from localhost ([127.0.0.1]:45734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOf7L-00081a-Dl for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jan 2009 16:23:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOf7F-0007z4-8S for bug-gnu-emacs@gnu.org; Sun, 18 Jan 2009 16:23:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOf7D-0007yK-WB for bug-gnu-emacs@gnu.org; Sun, 18 Jan 2009 16:23:32 -0500 Original-Received: from [199.232.76.173] (port=53722 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOf7D-0007xv-Hj for bug-gnu-emacs@gnu.org; Sun, 18 Jan 2009 16:23:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52113) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOf7B-0004ar-TS for bug-gnu-emacs@gnu.org; Sun, 18 Jan 2009 16:23:30 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0ILNRGe019125; Sun, 18 Jan 2009 13:23:27 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0IL57ma014235; Sun, 18 Jan 2009 13:05:08 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 18 Jan 2009 21:05:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1688 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1688-submit@emacsbugs.donarmstrong.com id=B1688.123231228811871 (code B ref 1688); Sun, 18 Jan 2009 21:05:07 +0000 Original-Received: (at 1688) by emacsbugs.donarmstrong.com; 18 Jan 2009 20:58:08 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0IKw4kJ011847 for <1688@emacsbugs.donarmstrong.com>; Sun, 18 Jan 2009 12:58:05 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4EADQmc0lMCpxj/2dsb2JhbACBbM1MhXOCAw X-IronPort-AV: E=Sophos;i="4.37,285,1231131600"; d="scan'208";a="32482682" Original-Received: from 76-10-156-99.dsl.teksavvy.com (HELO ceviche.home) ([76.10.156.99]) by ironport2-out.teksavvy.com with ESMTP; 18 Jan 2009 15:57:58 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0EA08B40F2; Sun, 18 Jan 2009 15:57:58 -0500 (EST) In-Reply-To: <4971C65F.9080703@foxmail.com> (richardeng@foxmail.com's message of "Sat, 17 Jan 2009 19:51:59 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 18 Jan 2009 16:23:32 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24260 gmane.emacs.pretest.bugs:23714 Archived-At: >> It's a good heursitic, but it's still just a heuristic. >> You may have a /dev/tty directory and still use /dev/tty1. >> Maybe it's better to get rid of the "/dev/" prefix to make it more clear >> that it's not really a valid file name. > you mean /dev/tty1 and /dev/tty/1 will exist at the same time? No, I mean both /dev/tty1 being the device you want and /dev/tty being a directory. Rather than ISDIR you could indeed just check which of /dev/tty1 and /dev/tty/1 exists and if only one exists then you should be pretty sure which answer is the right one. If they both exist (or if neither exists), it's much less clear what to do. > It won't as I know in Linux That depends on the dev layout chosen by the distribution/user/... I.e. it's a heuristic. > procfs_ttyname should return a full path of the ttyname, or at least > one function can return the fullpath. Why? Stefan