When I run cupsd manually (with or without "-l"), it gets a bit farther, and then makes a bad call to poll(). strace shows: 583644 getppid() = 583643 583644 kill(583643, SIGUSR1) = 0 583643 <... clock_nanosleep resumed>{tv_sec=0, tv_nsec=962872193}) = ? ERESTART_RESTARTBLOCK (Interrupted by signal) 583644 epoll_wait(3, <unfinished ...> 583643 --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=583644, si_uid=0} --- 583644 <... epoll_wait resumed>0x7fd0b8400010, 1073741816, 1000) = -1 EINVAL (Invalid argument) 583643 rt_sigreturn({mask=[]} <unfinished ...> 583644 close(3 <unfinished ...> 583643 <... rt_sigreturn resumed>) = -1 EINTR (Interrupted system call) 583644 <... close resumed>) = 0 583644 poll(NULL, 2, 1000) = -1 EFAULT (Bad address) 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] cupsdDoSelect() failed - Bad address!\n", 69) = 69 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] Listeners[0] = 6\n", 48) = 48 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] CGIPipes[0] = 7\n", 47) = 47 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] printer[narshe] reg_name=\"(null)\"\n", 65 <unfinished ...> 583643 exit_group(0 <unfinished ...> 583644 <... write resumed>) = 65 583643 <... exit_group resumed>) = ? 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] printer[narshe-user] reg_name=\"(null)\"\n", 70) = 70 583644 write(5, "X [22/Jun/2024:19:04:00 -0400] printer[PDF] reg_name=\"(null)\"\n", 62) = 62 583644 write(5, "E [22/Jun/2024:19:04:00 -0400] Scheduler shutting down due to program error.\n", 77) = 77
I don't see any documentation to suggest any operating system would accept a null pointer for poll(). Linux does not seem to like it, at least when nfds > 0. -- Michael
signature.asc
Description: PGP signature