Skip to content

child_process.fork not passing along options.env #20749

@borisovg

Description

@borisovg
  • Version: v8.11.1
  • Platform: Linux
  • Subsystem: Child Process

parent.js:

require('child_process').fork('./child.js', undefined, { env: { FOO: 'bar' } });

child.js

console.log(process.env.FOO);

output:

$ FOO=foo node parent.js 
foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions