Skip to content

Commit 3e357be

Browse files
committed
tst_cmd: Fix exit in search for program in $PATH
The check is executed before fork() so we have to do return instead of exit() otherwise we exit the library process. Fixes: 105d283 ("lib/tst_cmd_*(): Search for program in $PATH") Signed-off-by: Cyril Hrubis <[email protected]>
1 parent 599160c commit 3e357be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tst_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int tst_cmd_fds_(void (cleanup_fn)(void),
6464
tst_brkm(TCONF, cleanup_fn, "Couldn't find '%s' in $PATH at %s:%d", argv[0],
6565
__FILE__, __LINE__);
6666
else
67-
_exit(255);
67+
return 255;
6868
}
6969

7070
pid_t pid = vfork();

0 commit comments

Comments
 (0)