generate a process with large argv for proc_args testing

This commit is contained in:
Doug MacEachern 2005-06-02 17:55:40 +00:00
parent b8acea2adb
commit 2642e5ff3b

21
exp/argv.pl Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/perl
#generate a process with large argv for proc_args testing
use strict;
if (@ARGV) {
print "pid=$$\n";
<STDIN>;
}
else {
my(@argv);
my $nargs = 126;
my $arglen = 256;
my $arg = 'a';
for (my $i=0; $i<$nargs; $i++) {
push @argv, $arg++ x $arglen;
}
exec $^X, $0, @argv;
}