nlock
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1
Web 1.35
Web Perl module contains a set of useful routines for many webworking purposes. more>>
Web Perl module contains a set of useful routines for many webworking purposes.
This module was primarily made for UNIX/Linux-Systems. Parts of it cannot be used on other systems. E.g. the procedures for file locking demand systems that can use symlinks. If you use the modul on systems where symlinks cannot be used, fatal errors may happen.
ABSTRACT
This perl module serves users with several useful routines for many purposes, like generating webpages, processing CGI scripts, working with XML datafiles and net-connections. It also uses own variants of routines, that was invented first in the famous libraries CGI.pm and cgi-lib.pl.
INSTALLATION
If you dont have sufficient privileges to install web.pm in the Perl library directory, you can put web.pm into some convenient spot, such as your home directory, or in cgi-bin itself and prefix all Perl scripts that call it with something along the lines of the following preamble:
use lib /home/myname/perl/lib;
use web;
NLock
This routine allows to set a filelock across NFS-boundaries. The common used perl-routine flock() fails at this point, so this routine is a useable alternative for bigger file-systems. It uses the modular functions link() and unlink() to mark a file locked. In addition to this, it also gives the locked file a counter: A file that is locked for more than $web::MAX_LOCKTIME seconds will be freed by the next process that calls NLock() on this file. A calling process gets either 0 or 1 as a return value, where 1 is returned if the file-locking was successful. 0 is returned only if the process waits for more than $web::MAX_WAITLOCK seconds or if symlink() fails.
Example 1:
$filename = "data.txt";
NLock($filename);
open(f1,"$filename");
# do something
close f1;
NUnlock($filename);
Example 2:
#!/local/bin/perl5
use web;
$stat= &NLock("jump.pl");
print "Lock: stat= $statn";
$stat= &NLock("jump.pl");
print "Lock this file again: stat= $statn";
sleep 8;
$stat= &NLock("jump.pl");
print "Lock this file again: stat= $statn";
$stat= &NUnlock("jump.pl");
print "Unlock: stat= $statn";
exit;
<<lessThis module was primarily made for UNIX/Linux-Systems. Parts of it cannot be used on other systems. E.g. the procedures for file locking demand systems that can use symlinks. If you use the modul on systems where symlinks cannot be used, fatal errors may happen.
ABSTRACT
This perl module serves users with several useful routines for many purposes, like generating webpages, processing CGI scripts, working with XML datafiles and net-connections. It also uses own variants of routines, that was invented first in the famous libraries CGI.pm and cgi-lib.pl.
INSTALLATION
If you dont have sufficient privileges to install web.pm in the Perl library directory, you can put web.pm into some convenient spot, such as your home directory, or in cgi-bin itself and prefix all Perl scripts that call it with something along the lines of the following preamble:
use lib /home/myname/perl/lib;
use web;
NLock
This routine allows to set a filelock across NFS-boundaries. The common used perl-routine flock() fails at this point, so this routine is a useable alternative for bigger file-systems. It uses the modular functions link() and unlink() to mark a file locked. In addition to this, it also gives the locked file a counter: A file that is locked for more than $web::MAX_LOCKTIME seconds will be freed by the next process that calls NLock() on this file. A calling process gets either 0 or 1 as a return value, where 1 is returned if the file-locking was successful. 0 is returned only if the process waits for more than $web::MAX_WAITLOCK seconds or if symlink() fails.
Example 1:
$filename = "data.txt";
NLock($filename);
open(f1,"$filename");
# do something
close f1;
NUnlock($filename);
Example 2:
#!/local/bin/perl5
use web;
$stat= &NLock("jump.pl");
print "Lock: stat= $statn";
$stat= &NLock("jump.pl");
print "Lock this file again: stat= $statn";
sleep 8;
$stat= &NLock("jump.pl");
print "Lock this file again: stat= $statn";
$stat= &NUnlock("jump.pl");
print "Unlock: stat= $statn";
exit;
Download (0.017MB)
Added: 2007-07-21 License: Perl Artistic License Price:
864 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above nlock search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed