From owner-freebsd-current Mon Aug 28 8:15:38 2000 Delivered-To: freebsd-current@freebsd.org Received: from lists01.iafrica.com (lists01.iafrica.com [196.7.0.141]) by hub.freebsd.org (Postfix) with ESMTP id 3687237B423; Mon, 28 Aug 2000 08:15:30 -0700 (PDT) Received: from nwl.fw.uunet.co.za ([196.31.2.162]) by lists01.iafrica.com with esmtp (Exim 3.12 #2) id 13TQdD-0002fM-00; Mon, 28 Aug 2000 17:15:27 +0200 Received: (from nobody@localhost) by nwl.fw.uunet.co.za (8.8.8/8.6.9) id RAA03243; Mon, 28 Aug 2000 17:15:26 +0200 (SAST) Received: by nwl.fw.uunet.co.za via recvmail id 3077; Mon Aug 28 17:14:01 2000 Received: from sheldonh (helo=axl.fw.uunet.co.za) by axl.fw.uunet.co.za with local-esmtp (Exim 3.16 #1) id 13TQbp-000L3v-00; Mon, 28 Aug 2000 17:14:01 +0200 From: Sheldon Hearn To: phk@freebsd.org Cc: current@freebsd.org Subject: devname(3) broken for DEFVS Date: Mon, 28 Aug 2000 17:14:01 +0200 Message-ID: <80966.967475641@axl.fw.uunet.co.za> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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