Skip to content

Commit c36f5c6

Browse files
committed
fork() and system(): Change errno value from EAGAIN to ENOSYS
This is more correct. Trying again will not help. Fixes: emscripten-core#14124
1 parent ad438df commit c36f5c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/library.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ LibraryManager.library = {
171171
// pid_t fork(void);
172172
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html
173173
// We don't support multiple processes.
174-
setErrNo({{{ cDefine('EAGAIN') }}});
174+
setErrNo({{{ cDefine('ENOSYS') }}});
175175
return -1;
176176
},
177177
vfork: 'fork',
@@ -411,7 +411,7 @@ LibraryManager.library = {
411411
// http://pubs.opengroup.org/onlinepubs/000095399/functions/system.html
412412
// Can't call external programs.
413413
if (!command) return 0; // no shell available
414-
setErrNo({{{ cDefine('EAGAIN') }}});
414+
setErrNo({{{ cDefine('ENOSYS') }}});
415415
return -1;
416416
},
417417

0 commit comments

Comments
 (0)