From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: richardeng 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: Sat, 17 Jan 2009 19:51:59 +0800 Message-ID: <4971C65F.9080703@foxmail.com> References: <877i5q2ij9.fsf@broken.deisui.org> <496B7B23.9070203@foxmail.com> <49705FD0.6090006@foxmail.com> Reply-To: richardeng , 1688@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------000400070106070104040408" X-Trace: ger.gmane.org 1232193882 13030 80.91.229.12 (17 Jan 2009 12:04:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2009 12:04:42 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, ueno@unixuser.org, bug-gnu-emacs@gnu.org, 1688@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 17 13:05:53 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 1LO9vD-0000Su-4e for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2009 13:05:04 +0100 Original-Received: from localhost ([127.0.0.1]:34198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO9tw-0005iz-2E for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2009 07:03:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO9tl-0005hU-98 for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 07:03:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO9tj-0005gP-Au for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 07:03:32 -0500 Original-Received: from [199.232.76.173] (port=42497 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO9ti-0005g6-6a for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 07:03:30 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52181) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LO9th-0000tW-8z for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 07:03:29 -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 n0HC3Qtj002700; Sat, 17 Jan 2009 04:03:27 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0HC03IL001528; Sat, 17 Jan 2009 04:00:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: richardeng Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 17 Jan 2009 12:00:03 +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 submit@emacsbugs.donarmstrong.com id=B.123219316832724 (code B ref -1); Sat, 17 Jan 2009 12:00:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 17 Jan 2009 11:52:48 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0HBqjNa032718 for ; Sat, 17 Jan 2009 03:52:46 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO9jI-0001jG-LQ for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 06:52:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO9jG-0001hE-Pb for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 06:52:44 -0500 Original-Received: from [199.232.76.173] (port=49758 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO9jG-0001gw-LJ for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 06:52:42 -0500 Original-Received: from smtpbg3.foxmail.com ([121.14.102.33]:46742) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LO9j0-0007wq-Bl; Sat, 17 Jan 2009 06:52:27 -0500 Original-Received: from 172.25.76.137 (foxmail.com [172.25.76.137]) by smtpbg3 (foxmail.com) with SMTP id CkXVLMon; Sat, 17 Jan 2009 19:52:10 +0800 (envelope-from richardeng@foxmail.com) X-QQ-mid: esmtp2123219313063420038 Original-Received: from [192.168.1.111] (unknown [58.25.221.212]) by esmtp2.foxmail.com (ESMTP) with id ; Sat, 17 Jan 2009 19:51:58 +0800 (CST) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 17 Jan 2009 07:03: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:24228 gmane.emacs.pretest.bugs:23704 Archived-At: This is a multi-part message in MIME format. --------------000400070106070104040408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stefan Monnier wrote: >> check ISDIR first >> > > 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. > > > Stefan > > > you mean /dev/tty1 and /dev/tty/1 will exist at the same time? It won't as I know in linux procfs_ttyname should return a full path of the ttyname, or at least one function can return the fullpath. --------------000400070106070104040408 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Stefan Monnier wrote:
check ISDIR first
    

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.


        Stefan


  
you mean /dev/tty1 and /dev/tty/1 will exist at the same time?
It won't as I know in linux

procfs_ttyname should return a full path of the ttyname, or at least one function can return the fullpath.
--------------000400070106070104040408--