Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!sri-unix!hplabs!sdcrdcf!psivax!csun!sdsu!dlong From: dlong@sdsu.UUCP Newsgroups: comp.os.minix Subject: Looks like bug in head.c Message-ID: <2545@sdsu.UUCP> Date: Tue, 24-Feb-87 20:25:50 EST Article-I.D.: sdsu.2545 Posted: Tue Feb 24 20:25:50 1987 Date-Received: Sat, 28-Feb-87 00:52:24 EST Reply-To: dlong@sdsu.UUCP (mostly harmless) Distribution: world Organization: San Diego State University, Math/Sciences Dept. Lines: 26 This is on a Leading Edge PC, but it should apply to all. Looking at commands/head.c, I noticed that the routine that reads a line (do_line I think) only checks for '\n', not EOF. That could explain the strange things that happened when I tried "head" on a file shorter than the default. For example: "head commands/sync.c" causes problems since sync.c is about 3 lines long. After the sync.c is listed, nothing happens for a while, then comes the weird stuff. At 8Mhz I got an error that goes something like this: Unexpected trap:vector >= 16 This may be due to ... non-MINIX library routine that is trying to make a system call pc = 0x4955 text+data+bss = 0xB780 Also, there was static on the screen, as if something was poking around in screen memory. At 4Mhz, I only got the screen static. This time it was not continuous, but cycled on and off every second or so. I both cases, I had to reboot. I realize that most people probably don't have there hands on the floppies yet, so you can't try this, though you could verify what I said about about head.c by looking in the book. -- Dean Long San Diego State Univ. sdcsvax!sdsu!dlong