aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-02-12 19:05:44 -0600
committerRob Landley <rob@landley.net>2008-02-12 19:05:44 -0600
commit0f8c4c5998317e575f1afd47dad7f6967bc271ab (patch)
tree11613ae34f3830bf02914c9381eaa5790da63801 /main.c
parent6882ee89dc5da4081d5721706ad77a3e0396b1bc (diff)
downloadtoybox-0f8c4c5998317e575f1afd47dad7f6967bc271ab.tar.gz
Add TOYFLAG_UMASK.
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index 18daafbf..4e6a31e7 100644
--- a/main.c
+++ b/main.c
@@ -70,6 +70,7 @@ void toy_init(struct toy_list *which, char *argv[])
toys.argv = argv;
if (NEED_OPTIONS && which->options) get_optflags();
else toys.optargs = argv+1;
+ if (which->flags & TOYFLAG_UMASK) toys.old_umask = umask(0);
}
// Run a toy.