File: test-proc

package info (click to toggle)
libpar-perl 0.952-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,068 kB
  • ctags: 512
  • sloc: perl: 14,520; ansic: 870; makefile: 57
file content (19 lines) | stat: -rwxr-xr-x 348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w

use strict;

my $proc;
if( $^O =~ /linux/i ) {
    $proc = "/proc/$$/exe";
} else {
    $proc = "/proc/$$/file";
}

print "0 = $0\n";
$ENV{PAR_PROGNAME} ||= '';
print "PAR_PROGNAME = $ENV{PAR_PROGNAME}\n";
$ENV{PAR_TEMP} ||= '';
print "PAR_TEMP = $ENV{PAR_TEMP}\n";
if( $proc ) {
    print "exec = ", readlink( $proc  ), "\n";
}