Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Perl programint main() { pid_t pid; int status; char *argv[2]={"100033",NULL}; pid = fork(); if (pid < 0) return -1; if (pid == 0) { execv( "/wdir/script.pl", argv ); } }
@ARGV comes up empty. What do I do wrong here ?open (FILE,">test.txt"); print FILE $ARGV[0];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ARGV empty when calling Perl from C program
by toolic (Bishop) on May 23, 2014 at 13:54 UTC | |
|
Re: ARGV empty when calling Perl from C program
by McA (Priest) on May 23, 2014 at 14:12 UTC | |
by Lotus1 (Vicar) on May 23, 2014 at 14:37 UTC | |
by Anonymous Monk on May 23, 2014 at 20:45 UTC | |
by Lotus1 (Vicar) on May 24, 2014 at 14:32 UTC | |
by RonW (Parson) on May 23, 2014 at 19:30 UTC | |
by Lotus1 (Vicar) on May 23, 2014 at 20:25 UTC | |
|
Re: ARGV empty when calling Perl from C program
by Lotus1 (Vicar) on May 23, 2014 at 15:00 UTC |