tcllux::chan - TclLux chan
The TclLux chan Tcl extension provides chan functionality.
Configures the channelId. Options are -closeonexec and -handle. Returns an empty string when setting.
System sync. Returns an empty string.
Syncs the channelId. Returns an empty string.
Datasyncs the channelId. Returns an empty string.
Duplicates the channelId to a new channelId. Returns the new channelId.
Locks a region of a file. Options and their defaults: -shared true -start 0 -length 0 -origin start -blocking false. This command accepts but ignores a -pidvar option. Returns a boolean true if the locking was successful, false otherwise.
Unlocks a region of a file. Options and their defaults: -shared true -start 0 -length 0 -origin start -blocking false. This command accepts but ignores a -pidvar option. Returns a boolean true if the unlocking was successful, false otherwise.
Checks if region of a file can be locked. Options and their defaults: -shared true -start 0 -length 0 -origin start. This command accepts but ignores a -blocking option. This command accepts a -pidvar option: -pidvar varname. If the region can't be locked and the -pidvar option is supplied, the pid of the process holding the lock will be stored in the variable specified by varname. Returns a boolean true if the region can be locked, false otherwise.
Get or set the owner of a channelId. Returns an empty string when setting.
Writes data to channelId. Returns the number of bytes written to channelId.
fcntl(2), fsync(2), sync(2)
chan, unix
UNIX
Copyright © 2019 Stuart Cassoff <stwo@users.sourceforge.net>