Skip to content

child_process.exec hangs without executing commandΒ #27937

@sugarlandsoftware

Description

@sugarlandsoftware
  • Version: v8.10.0
  • 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:
  1. Windows 10 WSL running Ubuntu 18.04.2 LTS
  2. Apache Server 2.4.29 (Ubuntu)
  3. Xming X Server 6.9.0.31 (Windows 10)
  4. Firefox Quantum 67.0 (64-bit for Ubuntu)
  5. 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:
TestExec html_jpg
TestExec js_jpg
TestExec2 js_jpg
TestExec bash_jpg
TestExec_run

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions