- Timestamp:
- Apr 9, 2008, 10:36:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
locker/sbin/parallel-find.pl
r722 r724 8 8 my $dump = "/mit/scripts/sec-tools/store/versions"; 9 9 10 die if (-e $dump);11 `mkdir $dump`;10 (! -e $dump) || die "Output directory exists: $dump"; 11 system("mkdir", $dump) && die; 12 12 13 13 use Proc::Queue size => 40, debug => 0; … … 25 25 if(defined ($f) and $f==0) { 26 26 print "$user\n"; 27 # print "find /mit/$user/web_scripts -name .scripts-version -fprint $dump/$user 2> /dev/null"; 28 `find $homedir/web_scripts -xdev -name .scripts-version -fprint $dump/$user 2> /dev/null`; 27 my $ret = system("find $homedir/web_scripts -xdev -name .scripts-version -print > $dump/$user 2> /dev/null"); 29 28 sleep rand 1; 30 exit( 0);29 exit($ret); 31 30 } 32 1 while waitpid(-1, WNOHANG)>0; # reaps childs 31 while (waitpid(-1, WNOHANG)>0) { 32 $? && die "child exited with error: $?"; 33 }; # reaps childs 33 34 }
Note: See TracChangeset
for help on using the changeset viewer.