
21 Nov
2007
21 Nov
'07
4 p.m.
Simon Marlow wrote:
Christian Maeder wrote:
#!/bin/sh reldir=`dirname $0` topdir=`(cd $reldir; pwd)`
There's no guarantee that $0 holds anything reasonable: you can set $0 to whatever you like when calling exec*().
The above script simply does not work, if it is linked to from another place. (I don't know if that's related to exec, but I see the problem now.) Christian