diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2022-12-01 21:05:39 +0000 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2023-02-17 21:24:18 +0000 |
commit | 96f33c0395538256ab192ea7b26203a2061c4941 (patch) | |
tree | a8003d01e5dc707ace78b02499229c59977efd41 /src/nxt_process.h | |
parent | 3351bb4ff5cd2ef4d8f7cfb87451f021bcccb37e (diff) | |
download | unit-96f33c0395538256ab192ea7b26203a2061c4941.tar.gz unit-96f33c0395538256ab192ea7b26203a2061c4941.tar.bz2 |
Remove the nxt_getpid() alias.
Since the previous commit, nxt_getpid() is only ever aliased to
getpid(2).
nxt_getpid() was only used once in the code, while there are multiple
direct uses of getpid(2)
$ grep -r "getpid()" src/
src/nxt_unit.c: nxt_unit_pid = getpid();
src/nxt_process.c: nxt_pid = nxt_getpid();
src/nxt_process.c: nxt_pid = getpid();
src/nxt_lib.c: nxt_pid = getpid();
src/nxt_process.h:#define nxt_getpid() \
src/nxt_process.h:#define nxt_getpid() \
src/nxt_process.h: getpid()
Just remove it and convert the _single_ instance of nxt_getpid() to
getpid(2).
Reviewed-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r-- | src/nxt_process.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/nxt_process.h b/src/nxt_process.h index de54e383..16d6110c 100644 --- a/src/nxt_process.h +++ b/src/nxt_process.h @@ -13,9 +13,6 @@ #endif -#define nxt_getpid() \ - getpid() - typedef pid_t nxt_pid_t; |