Re: [PATCH v12 16/20] index-helper: don't run if already running

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

 



On Thu, May 19, 2016 at 11:45 PM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote:
>
> diff --git a/index-helper.c b/index-helper.c
> index 4a171e6..ddc641a 100644
> --- a/index-helper.c
> +++ b/index-helper.c
> @@ -438,6 +438,13 @@ int main(int argc, char **argv)
>                 return 0;
>         }
>
> +       /* check that no other copy is running */
> +       fd = unix_stream_connect(git_path("index-helper.sock"));
> +       if (fd > 0)
> +               die(_("Already running"));

I wonder is we should also die if fd == 0.
--
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]