--sam
Martins Krikis wrote:
>
> Sam,
>
> Thank you very much for your answer. I didn't know there is another
> "\r\n" coming after the posted data, since the other systems never
> did send a reset to the browser when I closed the socket. And I
> was so sure that it wasn't there because of this buggy piece of
> test-code before close():
>
> if (j = read(fd, line, 2) < 0)
> {
> perror("read");
> break;
> }
>
> printf("Just got: %d, %s", j, line);
>
> I.e., I was setting j to the result of logical comparison, not to the
> actual number of bytes read and therefore thought I'm reading 0 bytes.
> Forgotten parentheses. I feel like a complete idiot.
>
> My apologies to everyone on the list for nagging you with this "bug"
> which appeared to have nothing to do with the linux kernel (except
> for the fact that in 2.0 I could close() the socket early with no
> consequences).
>
> Thanks,
>
> Martin mkrikis@kenan.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/