From: utzoo!decvax!harpo!seismo!hao!hplabs!sri-unix!DEAN@USC-ECL Newsgroups: net.unix-wizards Title: Re: a summary of bugs in lpd.c on 4.1 Article-I.D.: sri-unix.5211 Posted: Sun Feb 27 16:01:16 1983 Received: Tue Mar 1 06:21:11 1983 From: Jeff DeanDate: 7 Jan 1983 0011-PST After months of not knowing why the line printer daemon died when the line printer was off line for a while, I eagerly snatched up the first fix I saw on unix-wizards. However, after I installed the change, I noticed that the daemon died even faster -- so I reinstalled the old code and threw the changes away (since a message to the author in uucp-land never got a response). Recently, someone has posted a list of fixes to lpd, including the one that didn't work for me. Hasn't anyone else noticed that the advertised fixes don't work? [ Or do I just have a version of lpd that's different than all the rest? Could have sworn we were running vanilla 4.1 ] Since I finally got tired of unwedging the line printer, I tracked down the bug, which turned out to be a bug in the bug fix. For those of you who are interested: the suggested changes included the addition of the line: fclose(fp); near the end of get_file However, the file is never open if the "if" at the top of the routine is false, thus causing lpd to crash even faster. Try moving the fclose into the scope where the file is opened. Let's keep those bug fixes coming, but let's try to keep them debugged! --JD -------