git: timeout(1): Use _exit(2) instead of err() in child if exec failed

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 18 19:35:53 PDT 2025


commit 827bd520b895f36643dcf0330a22f253f902339b
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Dec 27 15:40:43 2024 +0800

    timeout(1): Use _exit(2) instead of err() in child if exec failed
    
    * The child should _exit(2) instead of calling exit(3) via err(3) if the
      execvp() failed.
    * execvp(2) does not return except on error, so there is no need to
      check if the return value is -1.
    
    Obtained-from: OpenBSD

Summary of changes:
 usr.bin/timeout/timeout.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/827bd520b895f36643dcf0330a22f253f902339b


-- 
DragonFly BSD source repository


More information about the Commits mailing list