summaryrefslogtreecommitdiff
path: root/src/basic/process-util.c
AgeCommit message (Collapse)Author
2016-05-25stuffLuke Shumaker
2016-01-26shutdown: complain if process excluded from killing spree runs of the same ↵Michal Sekletar
rootfs as PID1
2016-01-21core: add valgrind helper for daemon-reexecEvgeny Vereshchagin
Inspired by https://github.com/systemd/systemd/issues/2187#issuecomment-165587140
2015-12-01basic: re-sort includesThomas Hindoe Paaboel Andersen
My previous patch to only include what we use accidentially placed the added inlcudes in non-sorted order.
2015-11-30basic: include only what we useThomas Hindoe Paaboel Andersen
This is a cleaned up result of running iwyu but without forward declarations on src/basic.
2015-10-27process-util: move a couple of process-related calls overLennart Poettering
2015-10-27process-util: make some minor corrections to PID live detectionLennart Poettering
2015-10-27process-util: rename get_parent_of_pid() → get_process_ppid()Lennart Poettering
In order to match the other get_process_xyz() calls.
2015-10-27process-util: actually move rename_process() overLennart Poettering
The prototype was moved long ago, actually move the definition over now, too.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move is_main_thread() to process-util.[ch]Lennart Poettering
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-26process-util: move more process related calls to process-util.[ch]Lennart Poettering
2015-10-26util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-24util: split out escaping code into escape.[ch]Lennart Poettering
This really deserves its own file, given how much code this is now.
2015-09-30fileio: make get_status_field() more genericAaro Koskinen
All users of get_status_field() expect the field pattern to occur in the beginning of a line, and the delimiter is ':'. Hardcode this into the function, and also skip any whitespace before ':' to support fields in files like /proc/cpuinfo. Add support for returning the full field value (currently stops on first whitespace). Rename the function so it's easier to ensure all callers switch to new semantics.
2015-08-31process-util: trivial optimizationLennart Poettering
2015-07-23process: an empty environment block should be returned as suchLennart Poettering
An empty env block is completely valid, hence return it as such, and don't turn it into an error.
2015-07-23process: return ESRCH when a PID is not valid anymoreLennart Poettering
so far, when we read something from /proc/$PID we would pass on the ENOENT from the kernel as error, if the process was missing. With this change we systematically convert this to ESRCH, which is the more appropriate error code, and what all the other glibc/syscalls like kill() use. All code that calls these functions should be fine with this change. In fact, one invocation of get_process_exe() in bus-creds.c already assumed ESRCH would be returned if a process is missing, and this assumption is now validated after the change.
2015-07-06get_process_environ: exit early when there is nothing to readKay Sievers
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/