[question] run pm2 god process in foreground on windows
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
When I start the selenium service with the following nodejs code, it works well,
const cp = require('child_process');
cp.spawn('java', ['-jar', 'selenium-server.jar', 'standalone']);
But if I start the service with pm2,
pm2.start({
script: `java`,
args: ['-jar','selenium-server.jar', 'standalone'],
name: 'selenium-standalone',
}, ...)
The service start successfully, but it will fail on opening Chrome browsers.
Windows seems to have a lot of strict when you need to interact with the GUI app. I think this problem have something to do with the pm2 god process, which is running in background (or use some special mode?) and have no permission to interact with GUI.
Is there anyway to run the pm2 god process (not its children) in foreground so that this problem can be workaround?
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the direct child_process.spawn example with the pm2.start configuration in the issue, focusing on how the Selenium Java process is launched on Windows. Determine whether the reported Chrome-launch failure is caused by the PM2 god process context and whether foreground execution is supported; document the confirmed behavior and workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, node.js, typescript
- Domain
- cli, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100