Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2000 17:14:01 +0200
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        phk@freebsd.org
Cc:        current@freebsd.org
Subject:   devname(3) broken for DEFVS
Message-ID:  <80966.967475641@axl.fw.uunet.co.za>

next in thread | raw e-mail | index | archive | help

Hi Poul-Henning,

I've been having trouble with ps(1) printing invalid controlling
terminal names for processes connected to psuedo-terminals.

This only seems to be a problem for DEVFS-enabled systems.

The output that makes it look like things are broken is this:

$ ps -t p7
  PID  TT  STAT      TIME COMMAND
80571 #C5  Ss     0:00.10 bash

It seems to be breakage in devname(3):

$ gdb /usr/obj/usr/src/bin/ps/ps
GNU gdb 4.18
[...]
(gdb) break print.c:311
Breakpoint 1 at 0x8048cb6: file /usr/src/bin/ps/print.c, line 311.
(gdb) run
Starting program: /usr/obj/usr/src/bin/ps/ps 
  PID  TT  STAT      TIME COMMAND

Breakpoint 1, tname (k=0x8090690, ve=0x8086040) at /usr/src/bin/ps/print.c:311
311             if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
(gdb) n
314                     if (strncmp(ttname, "tty", 3) == 0 ||
(gdb) print ttname
$2 = 0x807afe8 "#C5:1"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80966.967475641>