Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!moncskermit!goanna!yabbie!rcodi From: rcodi@yabbie.rmit.oz (Ian Donaldson) Newsgroups: comp.sources.bugs Subject: C Cross-ref package bug + FIX Message-ID: <615@yabbie.rmit.oz> Date: Mon, 12-Oct-87 11:00:43 EDT Article-I.D.: yabbie.615 Posted: Mon Oct 12 11:00:43 1987 Date-Received: Wed, 14-Oct-87 05:23:24 EDT Organization: RMIT Comm & Elec Eng, Melbourne, Australia. Lines: 48 Keywords: intr, quit I have discovered a bug in that if you hit ^C (or DEL or whatever) while in vi from eid, both vi and eid die. This would happen on -any- UNIX system. All attempts to contact the author via email have bounced unfortunately, so I am posting the fix here. The fix follows; its trivial: In "lid.c": Near the top, add the following two lines... ----- #include #include ----- In "lid.c": Instead of the wait(0): ----- { int (*oldint)() = signal(SIGINT, SIG_IGN); int (*oldquit)() = signal(SIGQUIT, SIG_IGN); while(wait(0) == -1 && errno == EINTR) /* loop */; (void) signal(SIGINT, oldint); (void) signal(SIGQUIT, oldquit); } ----- This is basically what system(3) does internally. A couple of other funnies: 1) no supplied man page for idx(1) or fid(1). What do they do? 2) file names with leading /'s can't be gid'd or eid'd etc, because the leading slash gets dropped somewhere, but mkid puts the names in the database and scans them happily. Try mkid'ing files in /usr/include and you'll see what I mean. There is lots of code that deals with /'s in the package, and not being absolutely sure of it all, I haven't touched it. This is an otherwise excellent piece of software and has saved me heaps of time so far on large packages. Ian D