opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit 78c1c0f2a99df80678fbff77911b498c5311dcc0
parent 22370cb3e35eca03455a38284c70ad1ad4eb2f4b
Author: Duncan Overbruck <mail@duncano.de>
Date:   Fri,  6 Dec 2019 02:45:22 +0100

timestamp.c: already return on 22th field of /proc/ppid/stat

this is the last field we are interested in and if we didn't reach it,
return an error.

Diffstat:
Mtimestamp.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/timestamp.c b/timestamp.c @@ -141,13 +141,11 @@ proc_info(pid_t pid, int *ttynr, unsigned long long *starttime) if (p == ep || (errno == ERANGE && *starttime == ULLONG_MAX)) return -1; - break; + return 0; } - if (n == 23) - break; } - return 0; + return -1; } #else #error "proc_info not implemented"