summaryrefslogtreecommitdiff
path: root/lib/libutil/pidlock.c
AgeCommit message (Collapse)Author
2020-03-30fail to create a pidfile if hostname contains '/'ryo
2012-04-07read returns ssize_t, and err is a function name.christos
2009-01-18fix -Wsign-compare issueslukem
2006-03-19Coverity CID 1209: Avoid negative close. While I am there fix bugs (openchristos
returning 0 is ok). Reorganize code to factor out common parts, cleanup syscall checking and error code return.
2005-08-27Lint warnings.elad
2003-07-26netbsd.org->NetBSD.orgsalo
2003-04-21PR/7885: Kip Rugger: ttylock(3) ignores flags and locker parameterschristos
2002-11-16use strlcpy/catitojun
2000-07-05- __RCSID() police.ad
- ANSIfy. - Miscellaneous style changes. - Shutup lint(1) in one or two cases.
1999-09-20back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.lukem
_DIAGASSERT() is still retained.
1999-09-16* use _DIAGASSERT() to check pointer arguments against NULL and filelukem
descriptors against -1 (as appropriate). * add actual checks which to detect stuff that would trigger_DIAGASSERT(), and attempt to return a sane error condition. * knf some code * remove some `register' decls. the first two items result in the addition of code similar to the following in various functions: _DIAGASSERT(path != NULL) #ifdef _DIAGNOSTIC if (path == NULL) { errno = EFAULT; return (-1); } #endif
1999-01-11In userland, pull in <errno.h> instead of <sys/errno.h> for the declarationkleink
of errno.
1998-12-09Delintchristos
1998-07-06- use an array MAXHOSTNAMELEN+1 size to hold hostnamesmrg
- ensure hostname from gethostname() is nul-terminated in all cases - minor KNF - use MAXHOSTNAMELEN over various other values/defines - be safe will buffers that hold hostnames
1997-10-19Test file type correctly, using S_IS*().mycroft
1997-10-12* Add hostname to temporary file to avoid collisions when locking oncjs
an NFS volume and competing with the same pid on another machine. * Make locking on an NFS-moutned file work properly by checking link count. * Make sure correct errno is returned.
1997-10-11Add pidlock, ttylock, ttyunlock functions.cjs