add filemode to open

This commit is contained in:
Koichi Nakamura 2021-12-29 06:47:40 +09:00
parent b6f99ebaf4
commit f38e55984f

View file

@ -178,7 +178,7 @@ defbinary("%", sar, >>, intptr_t)
defcode("(open)", openfile) {
int flags = pop();
char *name = (char*) pop();
int fd = open(name, flags);
int fd = open(name, flags, 0644);
push(fd);
next();
}