how do I send var number to ps process list ubuntu in node.js with spawn with options?

Viewed 19

how do I send var number to ps process list Ubuntu in node.js with spawn?

I have a var number for example : NUMBER_X : 12345

I want that send number to process in list ps process ubuntu My code is this:

const subprocess = spawn([], {

  "env":{
  ...process.env,
  NUMBER_X:1234
  },
  detached: true,
  stdio: 'ignore',
  
});

I want when type: ps -ef | grep process

Then I want to see NUMBER_X in list process Ubuntu

i use of spawn child process i want that send var number like x =1233 to process in ps list Ubuntu through options because we must get list running process and should I send id to each process in ps -ef | grep process

0 Answers
Related