From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19-7.0.1smp i686) Description of problem: In common.c::Scan_queue() the current directory is opened using opendir("."). This directory is never closed which causes a leak of the file descriptor. E.g. with 200 files in the queue I ended up with the spool directory open over 1000 times at the same time as shown by lsof. The process ends up running out of file descriptors. How reproducible: Always Steps to Reproduce: 1. Queue 200 files to be printed 2. Wait a while... 3. Use "lsof" on the "Server" daemon: lsof -p `ps ax | fgrep 'lpd (Server' | fgrep -v fgrep | sed 's/ .*//'` Actual Results: There were over 1000 instances of this in the output: lpd 11667 root 1023r DIR 3,7 28672 106188 /var/spool/lpd/lp Expected Results: There should be a single instance, if that. Additional info: Attached patch fixes the problem
Created attachment 22987 [details] Fixes file descriptor leak
This seems to be fixed in the upstream 3.8.4 release.
Fixed in LPRng-3.8.4-1.