in reply to Error in CGI::Session on Windows: flock() not implemented
use Fcntl ':flock'; # import LOCK_* constants sub lock { flock(MBOX,LOCK_EX); # and, in case someone appended # while we were waiting... seek(MBOX, 0, 2); } sub unlock { flock(MBOX,LOCK_UN); } open(MBOX, ">>/usr/spool/mail/$ENV{'USER'}") or die "Can't open mailbox: $!"; lock(); print MBOX $msg,"\n\n"; unlock();
Celebrate Intellectual Diversity
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error in CGI::Session on Windows: flock() not implemented
by sara2005 (Scribe) on Dec 12, 2005 at 19:32 UTC | |
by InfiniteSilence (Curate) on Dec 12, 2005 at 19:50 UTC | |
by sara2005 (Scribe) on Dec 13, 2005 at 00:00 UTC | |
by sara2005 (Scribe) on Dec 13, 2005 at 00:05 UTC |