We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35781cb commit 251caf8Copy full SHA for 251caf8
lib/wasi.c
@@ -3065,9 +3065,21 @@ wasi_instance_create(struct wasi_instance **instp) NO_THREAD_SAFETY_ANALYSIS
3065
*
3066
* XXX should restore on failure
3067
* XXX should restore when we are done
3068
+ * XXX this affects other programs sharing files.
3069
+ * (eg. shell pipelines)
3070
*/
3071
uint32_t i;
3072
for (i = 0; i < nfds; i++) {
3073
+ if (isatty(i)) {
3074
+ /*
3075
+ * a fragile hack:
3076
+ *
3077
+ * tty is often shared with other processes.
3078
+ * making such files non blocking breaks other
3079
+ * processes.
3080
+ */
3081
+ continue;
3082
+ }
3083
ret = set_nonblocking(i, true, NULL);
3084
if (ret != 0) {
3085
goto fail;
0 commit comments