| Summary: | [MFC] Improve/fix error messages in lpr's recvjob processing | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Garance A Drosehn <gad> | ||||
| Component: | bin | Assignee: | Garance A Drosehn <gad> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | gad | ||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Garance A Drosehn
2000-09-03 05:20:00 UTC
Responsible Changed From-To: freebsd-bugs->sheldonh I'll take this one. State Changed From-To: open->feedback I'm a bit concerned about the sleep(2) you added, which is not explained anywhere in the PR. Debugging code, or meaningful? Responsible Changed From-To: sheldonh->wollman I'm working on it. Garrett writes: > I'm a bit concerned about the sleep(2) you added, which is not > explained anywhere in the PR. Debugging code, or meaningful? > > http://www.freebsd.org/cgi/query-pr.cgi?pr=21007 Minor safety throttle. The error message being returned (by the 'putchar()' call right after the sleep) is going to the remote host. The remote host, which could be running any implementation of lpr, could decide to IMMEDIATELY retry the send. I like the idea of writing a message to syslog, then waiting a bit before telling the other side that they might want to retry. It makes it less likely that an error (*) on some remote machine will flood logfiles on this machine. As for the process on the print server, all it's going to do is exit anyway, so I wouldn't expect any problem in delaying that exit. (*) in this case, "error" means "awful implementation of lpr"... I can't say that I have ever seen some remote machine flood one of our print servers due to a problem like this, and I'm not all that tied to the sleep being there. I initially put it there just for debugging purposes, but then I didn't really see any reason to remove it when sending in the PR. The sleep isn't necessary for any of this to work, so if it's the potential for any problem then it certainly can be removed. --- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer (MIME & NeXTmail capable) Rensselaer Polytechnic Institute; Troy NY USA State Changed From-To: feedback->suspended The patch for fixing this error handling has been applied to current. Awaiting a good time to MFC. Responsible Changed From-To: wollman->gad This is another lpr-related PR which I had sent in, and which I might as well clear out now that I have commit access... State Changed From-To: suspended->closed Fix has been applied to both -current and -stable. |