User Tools

Site Tools


doc:appunti:prog:perl_flock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:prog:perl_flock [2011/02/26 13:44] – created niccolodoc:appunti:prog:perl_flock [2011/02/26 13:49] niccolo
Line 2: Line 2:
  
 <code perl> <code perl>
 +#!/usr/bin/perl
 +
 use Fcntl ':flock'; use Fcntl ':flock';
  
Line 18: Line 20:
  
 # Now the file open and locked. # Now the file open and locked.
 +print "File is locked!\n";
 +sleep(20);
  
 # Unlock and close the file. # Unlock and close the file.
doc/appunti/prog/perl_flock.txt · Last modified: 2011/02/26 13:56 by niccolo