System is a blocking call. Here is the begining of the man page for lockfile. Does that help?
lockfile can be used to create one or more semaphore files. If lockfile can't create all the specified files (in the specified order), it waits sleeptime (defaults to 8) seconds and retries the last file that didn't succeed. You can specify the number of retries to do until failure is returned. If the number of retries is -1 (default, i.e., -r-1) lockfile will retry forever.
So it is not able to create the file and it retries forever. Actually you are setting -2 as the retry interval and trying to set a max of 5 retries so it sould return after 10 seconds but it is not. GOK. Why shell out to create lockfiles anyway? Why not just do it native say like
sysopen($fh, "$dir/$name", O_CREAT | O_EXCL | O_RDWR, 0600);
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Perl script crashing at lockfile ?
by tachyon
in thread Perl script crashing at lockfile ?
by peterr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |