Re: [PATCH 0/9] Make gitexecdir relative to $(bindir) on Windows

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

 



Hi,

On Mon, 21 Jul 2008, Johannes Sixt wrote:

> The problem was that argv[0] does not have a path in certain cases.

Note that the same holds true for Linux when calling a program that is in 
the PATH:

-- snip --
#include <stdio.h>

int main(int argc, char **argv)
{
        printf("%s\n", argv[0]);
        return 0;
}
-- snap --

compiled and put into the PATH will output just what the user said, not 
the full path.

I imagine that the proper solution would be to rip out lookup_prog() and 
use it for non-Windows Git, too.  Unless you want to limit the usefulness 
of your patch series to Windows, that is.

In which case you could use lookup_prog() after unstatifying it.

Ciao,
Dscho
--
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]

  Powered by Linux