You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
child_process.exec hangs without executing command #27937
Platform: Linux 4.4.0-17763-Microsoft docs: Fix mixed content issues #379-Microsoft Wed Mar 06 19:16:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
Subsystem: child_process.exec
Software spec:
Windows 10 WSL running Ubuntu 18.04.2 LTS
Apache Server 2.4.29 (Ubuntu)
Xming X Server 6.9.0.31 (Windows 10)
Firefox Quantum 67.0 (64-bit for Ubuntu)
Node.js v8.10.0 for Ubuntu
The attached TestExec.html file runs TestExec.js, which executes TestExec.bash.
The user enters a string, which is written to TestExec.txt by the Bash script.
TestExec.bash is executed via child_process.exec.
TestExec2.js is a modified form of TestExec.js, with no dependencies on the HTML document.
TestExec2.js runs correctly from the command line, "node TestExec2.js".
However, TestExec.js hangs indefinitely, when child_process.exec("bash TestExec.bash arg") is called from Firefox.
(Note that the "puts called" message is never displayed in Firefox, indicating that puts() is never executed from child_process.exec [see TestExec_run.jpg screenshot])
Therefore, child_process.exec works at the command line, but not from Firefox, via the
TestExec.js script.
See 4 attached files:
However, TestExec.js hangs indefinitely, when child_process.exec("bash TestExec.bash arg") is called from Firefox.
You seem to be confusing Node.js with your browser. They're two completely separate things. child_process is not a thing in browsers, just like document isn't in Node.js.
I'm closing this out as not-a-bug. If you still have questions, please open an issue in the nodejs/help repo.
Activity
sugarlandsoftware commentedon May 28, 2019
bnoordhuis commentedon May 29, 2019
You seem to be confusing Node.js with your browser. They're two completely separate things.
child_processis not a thing in browsers, just likedocumentisn't in Node.js.I'm closing this out as not-a-bug. If you still have questions, please open an issue in the nodejs/help repo.