From 013919fa62208c5b795b1f7c156de0db05886684 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 4 Sep 2019 00:33:21 +0000 Subject: Make trap and wait use a stopwatch --- src/execline/trap.c | 1 + src/execline/wait.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/execline/trap.c b/src/execline/trap.c index ea4a006..2999fbf 100644 --- a/src/execline/trap.c +++ b/src/execline/trap.c @@ -69,6 +69,7 @@ int main (int argc, char const **argv, char const *const *envp) argv[argc1] = 0 ; while (i--) argvs[i] = 0 ; i = 0 ; + tain_now_set_stopwatch() ; tain_now_g() ; spfd = selfpipe_init() ; if (spfd < 0) strerr_diefu1sys(111, "selfpipe_init") ; diff --git a/src/execline/wait.c b/src/execline/wait.c index a7fe22f..93c42f7 100644 --- a/src/execline/wait.c +++ b/src/execline/wait.c @@ -67,6 +67,7 @@ static inline void mainloop (tain_t *deadline, int insist, actfunc_t_ref f, pid_ x.fd = selfpipe_init() ; if (x.fd < 0) strerr_diefu1sys(111, "create selfpipe") ; if (selfpipe_trap(SIGCHLD) < 0) strerr_diefu1sys(111, "trap SIGCHLD") ; + tain_now_set_stopwatch() ; tain_now_g() ; tain_add_g(deadline, deadline) ; while ((*f)(tab, n)) -- cgit v1.2.3