On Sat, Apr 28, 2012 at 4:40 PM, walter harms <[email protected]> wrote:
> Am 28.04.2012 12:15, schrieb Denys Vlasenko:
>> On Sat, Apr 28, 2012 at 11:49 AM, walter harms <[email protected]> wrote:
>>>>> lpr zero  (CUPS version)
>>>>> lpr: No file!?!
>>>>
>>>> Can you send a strace log of this command?
>>>
>>> log attached
>>
>> The crucial part is this one:
>>
>
>>
>> It's unclear whether the message comes from server or not,
>> since the reply recv'ed from server is truncated
>> in strace output.
>>
>> Can you re-run strace with -s9999 option?
>>
>
> socket(PF_FILE, SOCK_STREAM, 0)         = 3
> setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation not 
> supported)
> fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
> connect(3, {sa_family=AF_FILE, path="/var/run/cups/cups.sock"}, 26) = 0
> open("zero", O_RDONLY)                  = 5
> fstat(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> sendto(3, "POST /printers/color HTTP/1.1\r\nContent-Length: 
> 382\r\nContent-Type: application/ipp\r\nHost: localhost\r\nUser-Agent: 
> CUPS/1.3.9
> \r\nExpect: 100-continue\r\n\r\n", 148, 0, NULL, 0) = 148
> sendto(3, 
> "\1\1\0\2\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5de-deE\0\vprinter-uri\0\36ipp://localhost/
> printers/colorB\0\24requesting-user-name\0\6walterB\0\10job-name\0\4zeroI\0\17document-format\0\30application/octet-stream\2D\0\5media\0\2A4D
> \0\5sides\0\23two-sided-long-edge#\0\nfinishings\0\4\0\0\0\3!\0\6copies\0\4\0\0\0\1B\0\16job-hold-until\0\7no-hold!\0\fjob-priority\0\4\0\0\0
> 002!\0\tnumber-up\0\4\0\0\0\1B\0\njob-sheets\0\4noneB\0\0\0\4none\3", 382, 0, 
> NULL, 0) = 382
> poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
> recvfrom(3, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nDate: Sat, 28 
> Apr 2012 14:38:34 GMT\r\nServer: CUPS/1.3\r\nConnection: Keep-Aliv
> e\r\nKeep-Alive: timeout=60\r\nContent-Language: en\r\nContent-Type: 
> application/ipp\r\nContent-Length: 104\r\n\r\n\1\1\4\0\0\0\0\1\1G\0\22at
> tributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5de-deA\0\16status-message\0\nNo
>  file!?!\3", 2048, 0, NULL, NULL) = 325
> lseek(5, 0, SEEK_SET)                   = 0
> read(5, "", 32768)                      = 0
> close(5)                                = 0
> write(2, "lpr: No file!?!\n", 16)       = 16
> exit_group(1)                           = ?


As you can see, the reply indeed comes from server,
it's not lpr (client side program) which special-cases
zero-length files.

Can you send me two straces, of zero-length file printing
(with -s9999 strace option) and of a file with a single
space characher being printed?

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to