aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/freopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts/freopen.c')
-rw-r--r--ports/unix/guts/freopen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/unix/guts/freopen.c b/ports/unix/guts/freopen.c
index 45ca135..09219be 100644
--- a/ports/unix/guts/freopen.c
+++ b/ports/unix/guts/freopen.c
@@ -19,6 +19,7 @@
pseudo_debug(PDBGF_OP, "freopen '%s': fd %d\n", path, fd);
if (base_fstat(fd, &buf) != -1) {
if (!existed) {
+ real_fchmod(fd, PSEUDO_FS_MODE(0600, 0));
pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf);
}
pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf);