Re: [msysGit] [PATCH v3 3/8] imap-send: use run-command API for tunneling

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

 



On Tue, Oct 13, 2009 at 9:59 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:
> On Dienstag, 13. Oktober 2009, Erik Faye-Lund wrote:
>> +             argv[0] = "/bin/sh";
>> +             argv[1] = "-c";
>> +             argv[2] = srvc->tunnel;
>> +             argv[3] = NULL;
>
> Is there a particular reason that you run "/bin/sh" with a path? I doubt that
> this works on Windows.
>
> -- Hannes
>

It doesn't - I was being conservative. Getting tunneling to work on
Windows hasn't been a part of  my priorities (even though I did
briefly test it at some point and got it working, provided a patch
that changed the path to sh to a windows-path). Changing it to "sh -c"
(as was suggested earlier) could AFAIK break something for people who
have other 'sh's in path before /bin -- not that I think it would
matter terribly much.

If I were to fix this, I'd prefer not using sh at all on Windows. I've
seen that connect.c doesn't prepend "/bin/sh -c" at all, requiring
tunnels to be self-contained scripts or native binaries, unless I'm
mistaken. I'm not sure if this works at all on Windows, though. I just
think that the assumption that sh is the shell that is going to run
the tunnel is wrong to make, especially on Windows.

I'm really unsure if it's worth the hassle.

-- 
Erik "kusma" Faye-Lund
--
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]