fcntl.flock() (Unix file lock) behaviour sampling script

Category: Python - Miscellaneous

A quick fcntl.flock(fcntl.LOCK_EX | fcntl.LOCK_NB) call sampling script: with one file object (and descriptor) or separate file objects (and different descriptors) pointing to the same filesystem path -- with/without threading or forking.

It's rather exemplum-and-educational piece of code than utility-script, unless somebody has to few slots in their memory to remember that flock is file-descriptor-tacked (then quick run of the script can save web-searching) :) Date: 07 May, 2012


File - File Descriptor - File Lock - Flock - Process - Thread

Homepage: http://code.activestate.com/recipes/577404-fcntlflock-unix-file-lock-behaviour-sampling-scrip/?in=lang-python

Developer: Jan Kaliszewski

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Free file manager.

developer Developer: Tobias Bender
license License: GNU General Public License (GPL)
operating systems Operating System: ALL


PHPfileNavigator is an open source code and free application to do a complete management of yours files and folders by web.

developer Developer: Lito
license License: GNU General Public License (GPL)
operating systems Operating System: All


Asp Upload Component is a Windows compatible ActiveX component designed to ease access to multipart/form-data received from client's browser when developing Active Server Pages applications.

developer Developer: RF
license License: Freeware
operating systems Operating System: Windows


Samhain is a multiplatform, open source solution for centralized file integrity checking / host-based intrusion detection on POSIX systems (Unix, Linux, Cygwin/Windows).

developer Developer: Rainer Wichmann
license License: GNU General Public License (GPL)
operating systems Operating System: Linux


PaKnPosT Pro uses HTTP via Web browser to convey multiple files, and text email to notify file recipients.

developer Developer: Admin
license License: Mozilla Public License (MPL)
operating systems Operating System: Platform Independent


Mimesis is an Open Source PHP Flat File Database low-level API designed to act as a backend for server-side scripts that require database functionality.

developer Developer: Grim Pirate
license License: Unknown
operating systems Operating System: ALL


PHP File Renamer is PHP script that allows you to easily rename many files.

developer Developer: Blagoj
license License: GNU General Public License (GPL)
operating systems Operating System: unix,windows,linux


Given items that depend on other items, a topological sort arranges items in order that no one item precedes an item it depends on.

developer Developer: Paddy McCarthy
license License: Freeware
operating systems Operating System: Windows


Finds and downloads all images from any given URL.

developer Developer: FB36
license License: Freeware
operating systems Operating System: Windows