in reply to Perl script crashing at lockfile ?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl script crashing at lockfile ?
by peterr (Scribe) on Oct 01, 2003 at 12:27 UTC | |
by tachyon (Chancellor) on Oct 01, 2003 at 12:44 UTC | |
by peterr (Scribe) on Oct 02, 2003 at 02:13 UTC | |
by tachyon (Chancellor) on Oct 02, 2003 at 02:28 UTC | |
by peterr (Scribe) on Oct 02, 2003 at 04:29 UTC | |
by peterr (Scribe) on Oct 02, 2003 at 02:00 UTC | |
|
Re: Re: Perl script crashing at lockfile ?
by peterr (Scribe) on Oct 01, 2003 at 12:38 UTC | |
|
Re: Re: Perl script crashing at lockfile ?
by peterr (Scribe) on Oct 02, 2003 at 11:12 UTC | |
by tachyon (Chancellor) on Oct 02, 2003 at 14:40 UTC |