summaryrefslogtreecommitdiffstats
path: root/lib/procutils.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: use unique ifdefs for testsKarel Zak2017-01-041-2/+2
| | | | | | | Let's use unique TEST_PROGRAM_<NAME> ifdefs to make build system more robust. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: move fopen_at() to fileutils.h, remove at.hRuediger Meier2016-03-071-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lib: remove openat fallback functions (include/at.h)Ruediger Meier2016-03-071-3/+3
| | | | | | | | | | | | | | 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>
* lslocks: use stuff from lib/procutilsKarel Zak2015-11-251-3/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: fix redundant assignment and reassignments before use [cppcheck]Sami Kerola2015-08-081-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/procutils: add proc_get_cmdline()Karel Zak2015-07-201-0/+31
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* procutils: reset errno before readdirRuediger Meier2015-06-161-0/+1
| | | | | | | 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>
* lib/procutils: check fgets() return value [coverity scan]Karel Zak2014-07-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/procutils: notice setuid() process ownership changesSami Kerola2014-04-261-4/+5
| | | | | | | | | 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>
* lib/procutils: reset errno before strtol() callSami Kerola2014-04-261-1/+2
| | | | | | | | 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>
* lib/procutils: add simple API to scan /proc/PID/*Karel Zak2013-03-121-3/+127
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/procutils: test refactoringKarel Zak2013-03-121-4/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix 'make checkincludes' warningsKarel Zak2011-07-281-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [procutils.c] improve robustnessKarel Zak2011-06-201-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: hurd build fixesSamuel Thibault2011-06-201-0/+1
| | | | | | | | | | | | * 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>
* lib: [procutils.c]: add missing files. Sorry.Karel Zak2011-05-041-0/+122
Signed-off-by: Karel Zak <kzak@redhat.com>