Adding new printer hangs forever
bill green
bill.w.green at gmail.com
Sat Jan 5 15:10:15 PST 2008
I just built CUPS 1.3.5 on OpenBSD-sparc 4.2.
When I try to perform any function that POSTs data to the script,
admin.cgi gets caught in a loop in cgi_initialize_post()
at the following point:
/*
* Read the data into the buffer...
*/
for (tbytes = 0; tbytes < length; tbytes += nbytes)
if ((nbytes = read(0, data + tbytes, length - tbytes)) < 0)
if (errno != EAGAIN)
{
free(data);
return (0);
}
data[length] = '\0';
but read does return EAGAIN and the program loops forever. length is supposed to be 80 bytes, but it's not there at the read() call. I
think there should be an else clause to reset nbytes from -1 to 0 so that you don't lose one from tbytes every time read() returns EAGAIN,
but I have no idea why there wouldn't be anything to read from stdin.
Does anyone have suggestions?
More information about the cups
mailing list