Merge pull request #41 from nineties/add-filemode

add filemode to open
This commit is contained in:
Koichi NAKAMURA 2021-12-29 06:48:26 +09:00 committed by GitHub
commit f7cd936d79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();
}