Re: [PATCH v2 08/20] remote-curl: accept empty line as terminator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heya,

On Mon, Jun 20, 2011 at 00:42, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Thanks.  I wonder if that first "if" should be something like
>
>        if (strbuf_getline(&buf, stdin, '\n') == EOF) {
>                if (ferror(stdin))
>                        fprintf(stderr, "Error reading command stream\n");
>                else
>                        fprintf(stderr, "Unexpected end of command stream\n");
>                return 1;
>        }
>
> to catch I/O errors (e.g., the transport-helper exiting early).

Good idea, done. Tests still pass too ;).

-- 
Cheers,

Sverre Rabbelier
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]