summaryrefslogtreecommitdiffstats
path: root/src/ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ctx.c b/src/ctx.c
index 0f619c2..8fafb32 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -52,6 +52,9 @@ struct bfs_ctx *bfs_ctx_new(void) {
trie_init(&ctx->files);
+ ctx->umask = umask(0);
+ umask(ctx->umask);
+
if (getrlimit(RLIMIT_NOFILE, &ctx->orig_nofile) != 0) {
goto fail;
}