chiark / gitweb /
process-util: remove broken support for pid==0
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Jun 2016 00:57:41 +0000 (20:57 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:59 +0000 (10:12 +0200)
commitcf527c6873b86266ab75e56f28e2eada23866296
tree8e0fabe69c9999bda0faa37c21fc372a54e3da78
parent6bc15ba0015c5c35d2d3e68d0ed193e6c5e5f81d
process-util: remove broken support for pid==0

Our functions that query /proc/pid/ support using pid==0 to mean
self. get_process_id also seemed to support that, but it was not implemented
correctly: the result should be in *uid, not returned, and also it gave
completely bogus result when called from get_process_gid(). But afaict,
get_process_{uid,gid} were never called with pid==0, so it's not an actual
bug. Remove the broken code to avoid confusion.
src/basic/process-util.c