GNU bug report logs - #1688
23.0.60; ttname returned by system-process-attributes points to nonexisting file

Previous Next

Package: emacs;

Reported by: Daiki Ueno <ueno <at> unixuser.org>

Date: Wed, 24 Dec 2008 07:05:04 UTC

Severity: minor

Tags: wontfix

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1688 in the body.
You can then email your comments to 1688 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Wed, 24 Dec 2008 07:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daiki Ueno <ueno <at> unixuser.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 24 Dec 2008 07:05:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; ttname returned by system-process-attributes points to nonexisting file
Date: Wed, 24 Dec 2008 15:28:58 +0900
Hello,

Try to start Emacs with emacs -Q -nw on xterm, and then evaluate the
following expression:

(assq 'ttname (system-process-attributes (emacs-pid)))
=> (ttname . "/dev/pts17")

A "/" is missing between "pts" and "17".

(file-exists-p "/dev/pts17")
=> nil
(file-exists-p "/dev/pts/17")
=> t

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-12-24 on p360
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  which-function-mode: t
  icomplete-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x r e p o r t SPC e m a <tab> b <backspace> 
<return>

Recent messages:
Loading mime-setup...done
`completer' is not found.
`habbrev' is not found.
Loading remem...done
Loading /home/ueno/.emacs/init.el (source)...done
Loading /home/ueno/.emacs/custom.el (source)...
Loading icomplete...done
Loading which-func...done
Loading /home/ueno/.emacs/custom.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

-- 
Daiki Ueno




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 17:25:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 17:25:04 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: richardeng <richardeng <at> foxmail.com>
To: Daiki Ueno <ueno <at> unixuser.org>, 1688 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1688: 23.0.60;	ttname returned by system-process-attributes
 points to nonexisting	file
Date: Tue, 13 Jan 2009 01:17:23 +0800
Daiki Ueno wrote:
> Hello,
>
> Try to start Emacs with emacs -Q -nw on xterm, and then evaluate the
> following expression:
>
> (assq 'ttname (system-process-attributes (emacs-pid)))
> => (ttname . "/dev/pts17")
>
> A "/" is missing between "pts" and "17".
>
> (file-exists-p "/dev/pts17")
> => nil
> (file-exists-p "/dev/pts/17")
> => t
>
> If Emacs crashed, and you have the Emacs process in the gdb debugger,
> please include the output from the following gdb commands:
>     `bt full' and `xbacktrace'.
> If you would like to further debug the crash, please read the file
> /usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.
>
>
> In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
>  of 2008-12-24 on p360
> Windowing system distributor `The X.Org Foundation', version 11.0.10402000
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: ja_JP.UTF-8
>   value of $XMODIFIERS: @im=SCIM
>   locale-coding-system: utf-8-unix
>   default-enable-multibyte-characters: t
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   which-function-mode: t
>   icomplete-mode: t
>   tooltip-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   global-auto-composition-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   column-number-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent input:
> <escape> x r e p o r t SPC e m a <tab> b <backspace> 
> <return>
>
> Recent messages:
> Loading mime-setup...done
> `completer' is not found.
> `habbrev' is not found.
> Loading remem...done
> Loading /home/ueno/.emacs/init.el (source)...done
> Loading /home/ueno/.emacs/custom.el (source)...
> Loading icomplete...done
> Loading which-func...done
> Loading /home/ueno/.emacs/custom.el (source)...done
> For information about GNU Emacs and the GNU system, type C-h C-a.
>
>   
--- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 
-0800                                                   
+++ sysdep.c    2009-01-13 01:09:56.000000000 
-0800                                                           
@@ -3322,7 +3322,7 @@
                                                                                                              

             if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= 
minor_end)                                     
               
{                                                                                              

-                 sprintf (name + strlen (name), "%lu", MINOR 
(rdev));                                        
+                 sprintf (name + strlen (name), "/%lu", MINOR 
(rdev));                                       
                 
break;                                                                                       

               
}                                                                                              

           }                                





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 17:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 17:25:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 18:05:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 18:05:06 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: richardeng <richardeng <at> foxmail.com>
To: Daiki Ueno <ueno <at> unixuser.org>, 1688 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1688: 23.0.60;	ttname returned by system-process-attributes
 points to nonexisting	file
Date: Tue, 13 Jan 2009 02:00:09 +0800
Daiki Ueno wrote:
> Hello,
>
> Try to start Emacs with emacs -Q -nw on xterm, and then evaluate the
> following expression:
>
> (assq 'ttname (system-process-attributes (emacs-pid)))
> => (ttname . "/dev/pts17")
>
> A "/" is missing between "pts" and "17".
>
> (file-exists-p "/dev/pts17")
> => nil
> (file-exists-p "/dev/pts/17")
> => t
>
> If Emacs crashed, and you have the Emacs process in the gdb debugger,
> please include the output from the following gdb commands:
>     `bt full' and `xbacktrace'.
> If you would like to further debug the crash, please read the file
> /usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.
>
>
> In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
>  of 2008-12-24 on p360
> Windowing system distributor `The X.Org Foundation', version 11.0.10402000
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: ja_JP.UTF-8
>   value of $XMODIFIERS: @im=SCIM
>   locale-coding-system: utf-8-unix
>   default-enable-multibyte-characters: t
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   which-function-mode: t
>   icomplete-mode: t
>   tooltip-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   global-auto-composition-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   column-number-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent input:
> <escape> x r e p o r t SPC e m a <tab> b <backspace> 
> <return>
>
> Recent messages:
> Loading mime-setup...done
> `completer' is not found.
> `habbrev' is not found.
> Loading remem...done
> Loading /home/ueno/.emacs/init.el (source)...done
> Loading /home/ueno/.emacs/custom.el (source)...
> Loading icomplete...done
> Loading which-func...done
> Loading /home/ueno/.emacs/custom.el (source)...done
> For information about GNU Emacs and the GNU system, type C-h C-a.
>
>   
send again, "plain text only" has format problem...

--- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 
-0800                                                   
+++ sysdep.c    2009-01-13 01:09:56.000000000 
-0800                                                           
@@ -3322,7 +3322,7 @@
                                                                                                              

             if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= 
minor_end)                                     
               
{                                                                                              

-                 sprintf (name + strlen (name), "%lu", MINOR 
(rdev));                                        
+                 sprintf (name + strlen (name), "/%lu", MINOR 
(rdev));                                       
                 
break;                                                                                       

               
}                                                                                              

           }            





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 18:05:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 18:05:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 19:25:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 19:25:04 GMT) Full text and rfc822 format available.

Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: richardeng <richardeng <at> foxmail.com>, 1688 <at> debbugs.gnu.org
Cc: ueno <at> unixuser.org, emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1688: 23.0.60;	ttname returned by system-process-attributes points to nonexisting file
Date: Mon, 12 Jan 2009 21:19:39 +0200
> Date: Tue, 13 Jan 2009 01:17:23 +0800
> From: richardeng <richardeng <at> foxmail.com>
> Cc: emacs-pretest-bug <at> gnu.org
> 
> --- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 -0800
> +++ sysdep.c    2009-01-13 01:09:56.000000000 -0800
> @@ -3322,7 +3322,7 @@
> 
>  	       if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)
>   		 {
> -		   sprintf (name + strlen (name), "%lu", MINOR (rdev));
> +		   sprintf (name + strlen (name), "/%lu", MINOR (rdev));
>   		   break;
>   		 }                                                                                              
It's not that simple: what happens if `name' is something like "ptys"
or "tty"?  We need to generate "ptys2" and "tty39" for them, not
"ptys/2" and "tty/39".

So a more complex logic is required here.

Faced with this difficulty, I decided not to bother, since the value
of `ttname' is not documented to return a valid file name.

Perhaps some Linux guru (which I ain't) can suggest an easy solution.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 19:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 19:25:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 19:25:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 19:25:07 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 21:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 21:10:03 GMT) Full text and rfc822 format available.

Message #45 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 1688 <at> debbugs.gnu.org, richardeng <richardeng <at> foxmail.com>,
        emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org, ueno <at> unixuser.org
Subject: Re: bug#1688: 23.0.60; ttname returned by system-process-attributes points to nonexisting file
Date: Mon, 12 Jan 2009 16:04:50 -0500
>> --- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 -0800
>> +++ sysdep.c    2009-01-13 01:09:56.000000000 -0800
>> @@ -3322,7 +3322,7 @@
>> 
>> if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)
>> {
>> -		   sprintf (name + strlen (name), "%lu", MINOR (rdev));
>> +		   sprintf (name + strlen (name), "/%lu", MINOR (rdev));
>> break;
>> }                                                                                              
> It's not that simple: what happens if `name' is something like "ptys"
> or "tty"?  We need to generate "ptys2" and "tty39" for them, not
> "ptys/2" and "tty/39".

Indeed, it's pretty messy.  Even just procfs_ttyname in itself is pretty
messy (not its implementation, but the need to go through those hoops).

> Faced with this difficulty, I decided not to bother, since the value
> of `ttname' is not documented to return a valid file name.

> Perhaps some Linux guru (which I ain't) can suggest an easy solution.

I think it's OK for now.  When we really need something better, we'll
just look at the `ps' code.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 21:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 21:10:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Mon, 12 Jan 2009 21:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 12 Jan 2009 21:10:06 GMT) Full text and rfc822 format available.

Severity set to `minor' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 15 Jan 2009 23:45:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 10:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 10:30:03 GMT) Full text and rfc822 format available.

Message #62 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: richardeng <richardeng <at> foxmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 1688 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org, ueno <at> unixuser.org
Subject: Re: bug#1688: 23.0.60; ttname returned by system-process-attributes
 points to nonexisting file
Date: Fri, 16 Jan 2009 18:22:08 +0800
Stefan Monnier wrote:
>>> --- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 -0800
>>> +++ sysdep.c    2009-01-13 01:09:56.000000000 -0800
>>> @@ -3322,7 +3322,7 @@
>>>
>>> if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)
>>> {
>>> -		   sprintf (name + strlen (name), "%lu", MINOR (rdev));
>>> +		   sprintf (name + strlen (name), "/%lu", MINOR (rdev));
>>> break;
>>> }                                                                                              
>>>       
>> It's not that simple: what happens if `name' is something like "ptys"
>> or "tty"?  We need to generate "ptys2" and "tty39" for them, not
>> "ptys/2" and "tty/39".
>>     
>
> Indeed, it's pretty messy.  Even just procfs_ttyname in itself is pretty
> messy (not its implementation, but the need to go through those hoops).
>
>   
>> Faced with this difficulty, I decided not to bother, since the value
>> of `ttname' is not documented to return a valid file name.
>>     
>
>   
>> Perhaps some Linux guru (which I ain't) can suggest an easy solution.
>>     
>
> I think it's OK for now.  When we really need something better, we'll
> just look at the `ps' code.
>
>
>         Stefan
>
>
>   
check ISDIR first


--- sysdep.c.~1.328.~   2009-01-03 07:04:59.000000000 -0800                                                    
+++ sysdep.c    2009-01-15 02:03:07.000000000 -0800                                                            
@@ -3322,7 +3322,11 @@
                                                                                                              
             if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)                                      
               {                                                                                              
-                 sprintf (name + strlen (name), "%lu", MINOR (rdev));                                         
+                 struct stat st_addr;                                                                         
+                 if (!stat (name, &st_addr) && S_ISDIR(st_addr.st_mode))                                      
+                   sprintf (name + strlen (name), "/%lu", MINOR (rdev));                                      
+                 else                                                                                         
+                   sprintf (name + strlen (name), "%lu", MINOR (rdev));                                       
                 break;                                                                                       
               }                                                                                              
           }       








Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 10:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 10:30:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 10:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 10:30:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 21:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 21:10:03 GMT) Full text and rfc822 format available.

Message #77 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: richardeng <richardeng <at> foxmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 1688 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org, ueno <at> unixuser.org
Subject: Re: bug#1688: 23.0.60; ttname returned by system-process-attributes points to nonexisting file
Date: Fri, 16 Jan 2009 16:00:45 -0500
> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 21:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 21:10:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Fri, 16 Jan 2009 21:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 21:10:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sat, 17 Jan 2009 12:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 17 Jan 2009 12:00:03 GMT) Full text and rfc822 format available.

Message #92 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: richardeng <richardeng <at> foxmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 1688 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org, ueno <at> unixuser.org
Subject: Re: 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 part 1 (text/plain, inline)]
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.

[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sat, 17 Jan 2009 12:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 17 Jan 2009 12:00:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sat, 17 Jan 2009 12:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 17 Jan 2009 12:00:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sun, 18 Jan 2009 21:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 18 Jan 2009 21:05:05 GMT) Full text and rfc822 format available.

Message #107 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: richardeng <richardeng <at> foxmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 1688 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org, ueno <at> unixuser.org
Subject: Re: bug#1688: 23.0.60; ttname returned by system-process-attributes points to nonexisting file
Date: Sun, 18 Jan 2009 15:57:57 -0500
>> 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





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sun, 18 Jan 2009 21:05:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 18 Jan 2009 21:05:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1688; Package emacs. (Sun, 18 Jan 2009 21:05:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 18 Jan 2009 21:05:08 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jul 2011 14:37:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 1688 <at> debbugs.gnu.org and Daiki Ueno <ueno <at> unixuser.org> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jul 2011 14:37:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1688; Package emacs. (Sun, 10 Jul 2011 14:43:02 GMT) Full text and rfc822 format available.

Message #124 received at 1688 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: 1688 <at> debbugs.gnu.org
Subject: Re: bug#1688: 23.0.60;
	ttname returned by system-process-attributes points to nonexisting
	file
Date: Sun, 10 Jul 2011 16:36:12 +0200
I think the conclusion here was to do nothing:

> I think it's OK for now.  When we really need something better, we'll
> just look at the `ps' code.

So I'm closing the report.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Aug 2011 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.