[Cocci] make install broken

Michael Stefaniuc mstefani at mykolab.com
Wed Oct 11 21:26:57 CEST 2017


Hello Thierry,

On 10/11/2017 03:28 PM, Thierry Martinez wrote:
> Michael Stefaniuc:
>> But it isn't working when I have a symlink to spatch.
> 
> This surprises me because this is precisely what 82a6a045 is supposed to fix,
> and your version 3ba77b3 includes it.
> 
> I suppose it is because your shell does not define the environment variable
> "_" to the path of the running executable.
my shell (GNU bash, version 4.3.43(1)) does show the executable in $_
but that is the symlink and not the real path to the executable.

luna:~$ cd
luna:~$ echo -e '#!/bin/bash\necho $_' > foo.sh
luna:~$ chmod a+x foo.sh
luna:~$ ln -s ../foo.sh bin/foo.sh
luna:~$ ./foo.sh
./foo.sh
luna:~$ bin/foo.sh
bin/foo.sh
luna:~$ foo.sh
/home/michi/bin/foo.sh

bye
	michael

> 
> I just pushed on GitHub a more portable way for determining the path of the
> executable relying on proc_pidpath.
> 
> Thank you for the report.
> 



More information about the Cocci mailing list