Class: FFI::Flock
Overview
Flocking operation
Defined Under Namespace
Modules: Enums
Instance Attribute Summary collapse
-
#len ⇒ Integer
readonly
The length of the region to be locked.
-
#pid ⇒ Integer
readonly
The process ID (see Process Creation Concepts) of the process holding the lock.
-
#start ⇒ Integer
readonly
The offset of the start of the region to which the lock applies, and is given in bytes relative to the point specified by ##whence member.
-
#type ⇒ Symbol
readonly
Lock type, :rdlck, :wrlck, :unlck.
-
#whence ⇒ Symbol
readonly
Specifies what the offset is relative to, one of :seek_set, :seek_cur or :seek_end corresponding to the whence argument to fseek(2) or lseek(2),.
Method Summary
Methods included from Accessors
#fill, included, #inspect, #to_h
Instance Attribute Details
#len ⇒ Integer (readonly)
Returns the length of the region to be locked.
A value of 0 means the region extends to the end of the file.
|
# File 'lib/ffi/flock.rb', line 38
|
#pid ⇒ Integer (readonly)
Returns the process ID (see Process Creation Concepts) of the process holding the lock. It is filled in by calling fcntl with the F_GETLK command, but is ignored when making a lock. If the conflicting lock is an open file description lock (see Open File Description Locks), then this field will be set to -1.
|
# File 'lib/ffi/flock.rb', line 43
|
#start ⇒ Integer (readonly)
Returns the offset of the start of the region to which the lock applies, and is given in bytes relative to the point specified by ##whence member.
|
# File 'lib/ffi/flock.rb', line 34
|
#type ⇒ Symbol (readonly)
Returns lock type, :rdlck, :wrlck, :unlck.
|
# File 'lib/ffi/flock.rb', line 27
|
#whence ⇒ Symbol (readonly)
Returns specifies what the offset is relative to, one of :seek_set, :seek_cur or :seek_end corresponding to the whence argument to fseek(2) or lseek(2),.
|
# File 'lib/ffi/flock.rb', line 30
|