in reply to fcntl() madness with C and perl
use strict; use Fcntl qw(SEEK_SET F_WRLCK F_UNLCK F_SETLKW); my($pack); open(FILE,">a"); $pack = pack('s s l l s', F_WRLCK, SEEK_SET, 0, 1, 0); print(fcntl(FILE, F_SETLKW, $pack) . "\n"); sleep(20); $pack = pack('s s l l s', F_UNLCK, SEEK_SET, 0, 1, 0); print(fcntl(FILE, F_SETLKW, $pack) . "\n"); close(FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: fcntl() madness with C and perl
by Anonymous Monk on Jan 19, 2003 at 04:41 UTC | |
by pg (Canon) on Jan 19, 2003 at 05:46 UTC | |
|
Re^2: fcntl() madness with C and perl
by Preceptor (Deacon) on May 10, 2016 at 11:24 UTC |