On 31.05.2013 21:34, Mark Thomas wrote:
> "Caldarale, Charles R" <[email protected]> wrote:
>
>>> From: Mark Thomas [mailto:[email protected]]
>>> Subject: APR/native errors with non-blocking I/O
>>
>> Assuming these are negative errno values:
>>
>>> On OSX the error code is -32
>>
>> Broken pipe.
>>
>>> On Linux the error code is -104
>>
>> Connection reset by peer.
>>
>> Did the other end go away?
>>
>> Can you get a packet capture from both one end or the other?
>
> Thanks Chuck. Very helpful.
>
> The other end does hang up but it wasn't clear if that was the root cause or
> the result. The client reports invalid chunked encoding. I'll look into the
> client code.
>
> Where might I find a list of these error codes. My Google fu let me down.
First: the real numbers are the positive ones, so multiply all with -1.
The errno numbers are defined in
/usr/include/errno.h
and
/usr/include/sys/errno.h
at least on Linux. Most of them are not standardized, so can vary by
platform.
Then there's strerror(3C) and perror(3C) (so "man strerror", "man perror").
Example:
#include <stdio.h>
#include <string.h>
int main() {
int n;
while(1) {
printf("Enter errno: ");
scanf("%d", &n);
printf("Error string for errno %d is: %s\n",
n, strerror(n));
}
}
Compile and have fun.
IMHO we don't have that in the code to output text instead of cryptic
numbers because it isn't really available on all needed platforms. I
could be wrong though.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]