Skip to content

in npx dash-wasm: after the cat command, subsequent commands have problems with stdout #49

Open
@martin12333

Description

@martin12333

(a probably related issue: #42 )

// error when I used dash-wasm that was installed by npm

cd ~/10-cowasm/node_modules/dash-wasm

npx dash-wasm -x

(cowasm)$ cat wrongname1
+ cat wrongname1
cat: wrongname1: No such file or directory

(cowasm)$ cat wrongname1
+ cat wrongname1
cat: wrongname1: No such file or directory
cat: stdout: Bad file descriptor


(cowasm)$ cat /cowasm/usr/share/termcap
+ cat /cowasm/usr/share/termcap
cat: stdout: Bad file descriptor


(cowasm)$ echo abc
+ echo abc
sh: 4: echo: echo: I/O error


(cowasm)$ python
+ python
Python 3.11.0 (main, Nov 29 2022, 20:26:05) [Clang 15.0.3 ([email protected]:ziglang/zig-bootstrap.git 0ce789d0f7a4d89fdc4d9571 on wasi
Type "help", "copyright", "credits" or "license" for more information.

# i cannot see what i am typing
# 78*89
# aaaaaaaaa
# quit()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 8] Bad file descriptor

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'aaaaaaaaa' is not defined

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
OSError: [Errno 8] Bad file descriptor


(cowasm)$

(in browser, commands work correctly)

(but with 1 extra error message)

EDIT I have cut this chapter into a comment

(in a built dash, and using only the cat from the tar package, no errors)

EDIT I have cut this chapter into a comment

LATER: bin/cat from fs.zip ... errors even when I bypassed dash-wasm ... when I ran it from npx kernel dash

in a comment

LATER: the built ./cat from the tar package ... works ok even when I ran it from npx dash-wasm

in a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions