Commit Graph

8 Commits

Author SHA1 Message Date
Andrey A. Chernov
84dc22996d Implement canonical locking protocol
Suggested by: joerg
1997-08-10 18:42:39 +00:00
Andrey A. Chernov
e1a10354cb Improve weak locking by using flock() 1997-08-05 12:58:02 +00:00
Brian Somers
85b0d75dd9 Make uu_* const correct.
Suggested by:	joerg
1997-05-12 10:36:14 +00:00
Andrey A. Chernov
28804f92db Add Id
Reduce space for error bufer from 512 to 128: there is no such long strings
can be returned from strerror()
1997-04-02 04:24:39 +00:00
Andrey A. Chernov
81d9597ce7 Code space optimization in uu_lockerr() 1997-04-02 03:53:49 +00:00
Andrey A. Chernov
2875419215 Remove unused USE_PERROR define and syslog.h include
Use snprintf instead of sprintf to avoid buffer overflows
Use snprintf in uu_lockerr instead of lots of hardcoded constants
and not null-terminated strncpy
Return "" for OK and "device in use" for INUSE, it allows simple
strcpy(buf, uu_lockerr(retcode)) without testing for special OK
case (NULL was there) and obtaining meaningful result for INUSE
("" was there) without special testing for it too.
1997-04-02 03:38:29 +00:00
Brian Somers
687d0cdeb3 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
1997-03-31 22:51:00 +00:00
Brian Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00