fix umask syscall #3637
This commit is contained in:
Родитель
af1f4ce4b0
Коммит
e476217c98
|
@ -338,12 +338,9 @@ var SyscallsLibrary = {
|
|||
return 0;
|
||||
},
|
||||
__syscall60: function(which, varargs) { // umask
|
||||
#if SYSCALL_DEBUG
|
||||
Module.printErr('warning: untested syscall');
|
||||
#endif
|
||||
var mask = SYSCALLS.get();
|
||||
var old = SYSCALLS.umask;
|
||||
SYSCALLS.umask = newMask;
|
||||
SYSCALLS.umask = mask;
|
||||
return old;
|
||||
},
|
||||
__syscall63: function(which, varargs) { // dup2
|
||||
|
|
|
@ -4976,3 +4976,14 @@ int main() { printf("Mary had a little lamb.\n"); }
|
|||
assert proc.returncode == 0
|
||||
self.assertContained('#define __EMSCRIPTEN__ 1', out) # all our defines should show up
|
||||
|
||||
def test_umask_0(self):
|
||||
open('src.c', 'w').write(r'''
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
umask(0);
|
||||
printf("hello, world!\n");
|
||||
}''')
|
||||
Popen([PYTHON, EMCC, 'src.c']).communicate()
|
||||
self.assertContained('hello, world!', run_js('a.out.js'))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче