Closed int3 closed 10 years ago
Agreed. In the browser, we can simply pass in the stdout
function for stderr
to keep the same browser behavior.
This should be a part of our node emulation; the browser frontend would register a stdout
/stderr
callback with the node emulation layer.
I might hack it into BrowserFS, but it's somewhat outside the scope of that library.
I agree that it's not a good fit for BFS.
I'll eventually need to figure out a scheme for neatly combining node emulation libraries for different tasks (e.g. file system, sockets, etc).
Actually, it kindof does make sense -- stdout
is a Writable Stream, which I'll need to add to BFS eventually.
BrowserFS 0.3.2 now contains stdout/stderr/stdin
emulation that we can take advantage of. No need to have a hack that passes in callbacks to the JVM at runtime; configure the environment and be done with it.
Marking this as blocked on the upgrade to BFS 0.3.2
Upgrade complete. We can begin transitioning code to use process.sdout
/stderr
/stdin
.
Does this mean we can close #274?
No. Read the last comment there -- we have failing tests.
We're blocked again, btw. This time on this BrowserFS bug (whoops): https://github.com/jvilk/BrowserFS/issues/82
I just merged in our stdout/stderr/stdin
branch to master, so this is fixed.
This is useful mostly for the node frontend. It will prevent us from dumping both error messages and actual output into the
tools/preload
file. (Also see #202.)