Frank Wu wrote: > > Hi guys, Hello,
> I have a perl script using system function, owner is root, like, > > print "Previous $?, $!" ; > system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 > or die "Unable to create directory,$!, $?" > > system function sometimes return non-zero value, $? is -1 $! is No child > process, but the directory is actually created and mode's changed, There are > enouhg file handlers and inodes. It also happens to touch, echo, open pipe. > > $! error message No child process is already there before the system call as > i print $! before call system function. > > Enviroment is: > Linux version 2.2.17 (gcc version 2.95.2 20000220 (Debian GNU/Linux)) > perl 5.005_03 > > After reboot machine, it's disappeared on some machines, but not on some > machine. > > Can you point me where i look at to find what causes the problem, or is > there other better way to trap system call error? use File::Path; mkpath( '/home/myhome/disp/archive', 0, 0755 ) or die "Cannot mkpath '/home/myhome/disp/archive': $!"; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]