Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flock() not working in my Perl script.. Why??

Status
Not open for further replies.

bdw238

MIS
Dec 15, 2005
52
0
0
GB
On attempting to use the flock function in my perl script on Aix 5.3 server, and it does not lock correctly. What I am doing wrong?

sysopen($lockhandle,"/var/locks/test.lock",O_RDWR | O_CREAT,0664) || die ("Can Not open $LOCKFILE: $!\n");
unless (flock($lockhandle,LOCK_EX |LOCKNB)) {
exit 1;
}

Not this code works on Suse Linux, OK


Brian

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top