diff options
author | brian <brian@FreeBSD.org> | 1998-05-28 23:17:09 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-05-28 23:17:09 +0000 |
commit | f320a1dcb71e3195a3a9ab924dd4f60db4c3ac53 (patch) | |
tree | 1d26f17a62e7ee5f285608c48bd75d5c87092973 /lib/libutil/uucplock.3 | |
parent | f0bbc1adc545f86776a2ecc51a460599ad4bbc9a (diff) | |
download | FreeBSD-src-f320a1dcb71e3195a3a9ab924dd4f60db4c3ac53.zip FreeBSD-src-f320a1dcb71e3195a3a9ab924dd4f60db4c3ac53.tar.gz |
Add uu_lock_txfr() to transfer ownership of a successful
uu_lock() to another process.
Diffstat (limited to 'lib/libutil/uucplock.3')
-rw-r--r-- | lib/libutil/uucplock.3 | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/libutil/uucplock.3 b/lib/libutil/uucplock.3 index c920e4a..563323c 100644 --- a/lib/libutil/uucplock.3 +++ b/lib/libutil/uucplock.3 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: uucplock.3,v 1.9 1997/09/29 19:11:25 wosch Exp $ +.\" $Id: uucplock.3,v 1.10 1997/10/07 07:24:50 joerg Exp $ .\" " .Dd March 30, 1997 .Os @@ -39,6 +39,8 @@ .Ft int .Fn uu_lock "const char *ttyname" .Ft int +.Fn uu_lock_txfr "const char *ttyname" "pid_t pid" +.Ft int .Fn uu_unlock "const char *ttyname" .Ft const char * .Fn uu_lockerr "int uu_lockresult" @@ -63,6 +65,11 @@ the process id found in the lock file is no longer running, .Fn uu_lock will write its own process id into the file and return success. .Pp +.Fn uu_lock_txfr +transfers lock ownership to another process. +.Fn uu_lock +must have previously been successful. +.Pp .Fn uu_unlock removes the lockfile created by .Fn uu_lock @@ -130,10 +137,24 @@ to be changed between calls to .Fn uu_lock and .Fn uu_lockerr . +.Pp +.Fn uu_lock_txfr +may return any of the following values: +.Pp +.Dv UU_LOCK_OK: +The transfer was successful. The specified process now holds the device +lock. +.Pp +.Dv UU_LOCK_OWNER_ERR: +The current process does not already own a lock on the specified device. +.Pp +.Dv UU_LOCK_WRITE_ERR: +The new process id could not be written to the lock file via a call to +.Xr write 2 . .Sh ERRORS If .Fn uu_lock -returns one of the four error values above, the global value +returns one of the error values above, the global value .Va errno can be used to determine the cause. Refer to the respective manual pages for further details. |