Bug 13870

Summary: "ps tpt" produces "ps: /dev/ttypT: No such file or directory"
Product: Base System Reporter: inwap <inwap>
Component: binAssignee: Brian Somers <brian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 2.2.8-STABLE   
Hardware: Any   
OS: Any   

Description inwap 1999-09-21 11:30:04 UTC
	The command "ps tpt" fails for /dev/ttypt only.

Fix: 

No workaround.  Problem exists in 3.3 kernel as well.
How-To-Repeat: 
	Note that "pr" through "pv" work with the exception of "pt".

(home/inwap) inwap@shell3> ls /dev/ttyp?
/dev/ttyp0      /dev/ttyp7      /dev/ttype      /dev/ttypl      /dev/ttyps
/dev/ttyp1      /dev/ttyp8      /dev/ttypf      /dev/ttypm      /dev/ttypt
/dev/ttyp2      /dev/ttyp9      /dev/ttypg      /dev/ttypn      /dev/ttypu
/dev/ttyp3      /dev/ttypa      /dev/ttyph      /dev/ttypo      /dev/ttypv
/dev/ttyp4      /dev/ttypb      /dev/ttypi      /dev/ttypp
/dev/ttyp5      /dev/ttypc      /dev/ttypj      /dev/ttypq
/dev/ttyp6      /dev/ttypd      /dev/ttypk      /dev/ttypr
(home/inwap) inwap@shell3> ps tpr
  PID  TT  STAT      TIME COMMAND
12090  pr  Is+    0:00.07 -tcsh (tcsh)
(home/inwap) inwap@shell3> ps tps
  PID  TT  STAT      TIME COMMAND
13953  ps  Is+    0:00.11 -tcsh (tcsh)
(home/inwap) inwap@shell3> ps tpt
ps: /dev/ttypT: No such file or directory
(home/inwap) inwap@shell3> ps tpu
  PID  TT  STAT      TIME COMMAND
 3263  pu  Is     0:00.07 -csh (csh)
(home/inwap) inwap@shell3> ps tpv
  PID  TT  STAT      TIME COMMAND
(home/inwap) inwap@shell3> uname -a
FreeBSD shell3.ba.best.com 2.2.8-STABLE FreeBSD 2.2.8-STABLE #104: Sat Sep  4 16:02:26 PDT 1999     dima@tick.best.net:/src/src/sys/compile/BEST  i386
Comment 1 Danny J. Zerkel 1999-11-07 18:08:20 UTC
Well, the workaround is to use:

ps -tpt

The kuldge_oldps_options(), blindly replaces the trailing 't' with 'T'.
It should probably check for an
eat-all-remaining-characters type option first.  But, that is the nature
of kludges.

-- Danny J. Zerkel
dzerkel@columbus.rr.com
Comment 2 dd freebsd_committer freebsd_triage 2001-06-17 03:32:10 UTC
State Changed
From-To: open->closed

Fixing this would mean breaking compatibility.  Considering that simply 
prepending a dash--which you should be doing anyway--solves the problem, 
I don't think it's worth it.
Comment 3 ru freebsd_committer freebsd_triage 2001-08-16 07:32:00 UTC
State Changed
From-To: closed->feedback

Fixed in 5.0-CURRENT, bin/ps/ps.c,v 1.41. 


Comment 4 ru freebsd_committer freebsd_triage 2001-08-16 07:32:00 UTC
Responsible Changed
From-To: freebsd-bugs->brian

MFC reminder.
Comment 5 Brian Somers freebsd_committer freebsd_triage 2001-09-26 10:31:23 UTC
State Changed
From-To: feedback->closed

Applied to -stable