From owner-freebsd-bugs Mon Nov 18 12:08:23 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA08709 for bugs-outgoing; Mon, 18 Nov 1996 12:08:23 -0800 (PST) Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA08690 for ; Mon, 18 Nov 1996 12:08:18 -0800 (PST) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <17503(3)>; Mon, 18 Nov 1996 12:07:37 PST Received: from localhost by crevenia.parc.xerox.com with SMTP id <177557>; Mon, 18 Nov 1996 12:06:23 -0800 To: "Jin Guojun[ITG]" cc: joerg_wunsch@uriah.heep.sax.de, bugs@freebsd.org Subject: Re: diff somehow does not work properly in 2.2-ALPHA In-reply-to: Your message of "Mon, 18 Nov 96 09:47:12 PST." <199611181747.JAA07051@george.lbl.gov> Date: Mon, 18 Nov 1996 12:06:17 PST From: Bill Fenner Message-Id: <96Nov18.120623pst.177557@crevenia.parc.xerox.com> Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199611181747.JAA07051@george.lbl.gov> you write: >I placed the ktrace.out at ftp://george.lbl.gov/pub/tmp/ktrace.out Someone closed stdout, right near the beginning of the program. It might even be before main() gets control, my untrained eye can't say. It's the last system call before a readlink() of /etc/malloc.conf, which might or might not point to something. A section of the interpreted ktrace: 13410 diff CALL open(0x801e0a0,0,0) 13410 diff NAMI "/usr/lib/libc.so.3.0" 13410 diff RET open 3 13410 diff CALL read(0x3,0xefbfd890,0x20) 13410 diff GIO fd 3 read 32 bytes "L\0\M^F@\0\M^@\^E\0\0@\0\0@F\0\0|0\0\0" 13410 diff RET read 32/0x20 13410 diff CALL mmap(0,0x68640,0x5,0x2,0x3,0,0,0) 13410 diff RET mmap 134402048/0x802d000 13410 diff CALL close(0x3) 13410 diff RET close 0 13410 diff CALL mprotect(0x8085000,0x4000,0x7) 13410 diff RET mprotect 0 13410 diff CALL mmap(0x8089000,0xc640,0x7,0x1012,0xffffffff,0,0,0) 13410 diff RET mmap 134778880/0x8089000 13410 diff CALL mmap(0,0xa000,0x3,0x1002,0xffffffff,0,0,0) 13410 diff RET mmap 134832128/0x8096000 13410 diff CALL munmap(0x8023000,0x13dc) 13410 diff RET munmap 0 13410 diff CALL close(0x1) 13410 diff RET close 0 13410 diff CALL readlink(0x8077d3a,0xefbfd8f0,0x3f) 13410 diff NAMI "/etc/malloc.conf" 13410 diff RET readlink -1 errno 2 No such file or directory Since stdout is closed, diff can't write to it later when it wants to display its output, thus "write error". Bill