diff options
author | Brian Somers <brian@FreeBSD.org> | 1997-03-31 22:51:00 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1997-03-31 22:51:00 +0000 |
commit | e246fe4cd9c292f4ef654f80d2eba676ff52f880 (patch) | |
tree | 3d695bcebd4e79c6b8fa747cc5a5744800d6f778 /libutil | |
parent | 4face28ba2cfee14ec31873c958e0ab80255fc22 (diff) | |
download | pw-darwin-e246fe4cd9c292f4ef654f80d2eba676ff52f880.tar.gz pw-darwin-e246fe4cd9c292f4ef654f80d2eba676ff52f880.tar.zst pw-darwin-e246fe4cd9c292f4ef654f80d2eba676ff52f880.zip |
Remove the syslog stuff, and allow various return values
in uu_lock(). Add uu_lockerr() for turning the results of
uu_lock into something printable. Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly where it should.
Suggested by: ache@freebsd.org
Diffstat (limited to 'libutil')
-rw-r--r-- | libutil/libutil.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libutil/libutil.h b/libutil/libutil.h index 695a8cb..35c1163 100644 --- a/libutil/libutil.h +++ b/libutil/libutil.h @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file providing the above * conditions are met. * - * $Id: libutil.h,v 1.4 1997/02/22 15:08:14 peter Exp $ + * $Id: libutil.h,v 1.5 1997/03/30 12:11:27 brian Exp $ */ #ifndef _LIBUTIL_H_ @@ -41,8 +41,16 @@ int openpty __P((int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)); int forkpty __P((int *amaster, char *name, struct termios *termp, struct winsize *winp)); +char *uu_lockerr __P((int uu_lockresult)); int uu_lock __P((char *ttyname)); int uu_unlock __P((char *ttyname)); __END_DECLS +#define UU_LOCK_INUSE (1) +#define UU_LOCK_OK (0) +#define UU_LOCK_OPEN_ERR (-1) +#define UU_LOCK_READ_ERR (-2) +#define UU_LOCK_SEEK_ERR (-3) +#define UU_LOCK_WRITE_ERR (-4) + #endif /* !_LIBUTIL_H_ */ |