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
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