* add delay between attempts
* zeroize errno and check for EAGAIN (like in other code)
* add small test program
./test_procutils --is-procfs [<dir>]
Signed-off-by: Karel Zak <kzak@redhat.com>
It's was originally GPL, but all the current code in the file is from
me and I don't think it makes sense to use GPL here anymore. We need
to use lib/ files in LGPL as well as in GPL binaries, etc. Let's makes
things (build-system) less complicated.
Signed-off-by: Karel Zak <kzak@redhat.com>
I have validated that we are still compatible at least back to
- openSUSE 11.4
- SLE 11
- RHEL/CentOS 6
- OSX 10.10.x, (Xcode 6.3)
- FreeBSD 10.2
Confirmed incompatibility:
- OSX 10.9.x, (Xcode 6.2)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
readdir(3p): "When the end of the directory is encountered, a null
pointer shall be returned and errno is not changed"
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Earlier the owner of a process was determined by owner of the
/proc/<pid>/stat file. When changes user ID privileges with setuid() the
stat file ownership is not updated, that resulted kill(1) to consider
such processes where running using same uid as the present process.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
When going through /proc the last entry made readdir() to alter errno,
which made the strtol() to think something went wrong, resulting kill(1)
tests to fail when running in --parallel mode.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available.
* Make procutils.c include c.h to get a PATH_MAX replacement.
* Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM
defaults for Hurd.
* Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are
available.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>