Hi Dave,

On Sun, 3 Jul 2016, David Turner wrote:

> @@ -357,10 +359,29 @@ static const char * const usage_text[] = {
>       NULL
>  };
>  
> +static void request_kill(void)
> +{
> +     int fd = unix_stream_connect(git_path("index-helper.sock"));
> +
> +     if (fd >= 0) {
> +             write_in_full(fd, "die", 4);

I believe that this is incorrect. When I interrupt t7900 after the 3rd
test case, it says

        fatal: protocol error: bad line length character: die

twice, suggesting that this write_in_full() actually needs to be a
packet_write(fd, "die") instead, seeing as loop() uses the packet_read()
call to read the messages.

BTW I am in the middle of trying to abstract out a "simple server" that
will allow me to back the inter-process communication by a pure Windows
solution (named pipes) instead of the Unix sockets. It turns out to be
much more difficult than I hoped: the code is really relying on Unix
sockets currently.

Will keep you posted,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to