Lines 45-51
getpid() {
Link Here
|
45 |
|
45 |
|
46 |
# Finally try to extract it from ps depending on the OS |
46 |
# Finally try to extract it from ps depending on the OS |
47 |
case "`uname -s -r`" in |
47 |
case "`uname -s -r`" in |
48 |
LINUX20|Linux\ 2*) |
48 |
LINUX20|Linux\ [23]*) |
49 |
ps auxw | awk 'BEGIN { prog=ARGV[1]; dir=ARGV[2]; ARGC=1 } |
49 |
ps auxw | awk 'BEGIN { prog=ARGV[1]; dir=ARGV[2]; ARGC=1 } |
50 |
{ if ((prog == $11) || (("(" prog ")") == $11) || |
50 |
{ if ((prog == $11) || (("(" prog ")") == $11) || |
51 |
((prog ":") == $11) || ((dir "/" prog) == $11)) |
51 |
((prog ":") == $11) || ((dir "/" prog) == $11)) |