Help for this page
lockfile can be used to create one or more semaphore files. If lockfile can't create all the specified files ... is returned. If the number of retries is -1 (default, i.e., -r-1) lockfile will retry forever.
sysopen($fh, "$dir/$name", O_CREAT | O_EXCL | O_RDWR, 0600);