From a28ad6de961169acf50d96427259f9eba6039b5d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 27 Apr 2021 02:40:54 -0500 Subject: Use cheaper test that works with "toybox" name as a prefix. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 6e3da111..d5abe6e6 100644 --- a/main.c +++ b/main.c @@ -95,7 +95,7 @@ void toy_singleinit(struct toy_list *which, char *argv[]) for (toys.optc = 0; toys.optargs[toys.optc]; toys.optc++); } - if (strcmp(which->name, "toybox") && !(which->flags & TOYFLAG_NOFORK)) { + if (!(CFG_TOYBOX && which == toy_list) && !(which->flags & TOYFLAG_NOFORK)) { toys.old_umask = umask(0); if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); -- cgit v1.2.3