-
Notifications
You must be signed in to change notification settings - Fork 1k
Packaged exe is not executing in a specific scenario #1241
Comments
Sanitize the environment variables before you launch pkg executable from a pkg-launched program. Specifically pkg adds it when it launches another program, to allow executing sub programs and avoid infinite loop. The executed program inherited the variables, will pass it to programs launched by it, and pkg will hit the kill switch. |
Thanks Jesec !! I printed and compared the environment variables in the first cycle and the subsequent cycles. I found one additional environment variable in subsequent cycles, I.e. PKG_EXECPATH. Now my doubt is whether any additional environment variable I need to check (although I don’t find any additional variable starting from PKG_ except the one I mention d above). |
@deepakblr It would be nice if you could update the readme with this knowledge if it works now :) |
@Hypfer for sure !!! Will update it and post here |
@Hypfer not able to create Branch, possibly I do not have permission to do so. |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit. |
I have built an executable using pkg command ---> lets call it process B.
Scenario:
We have 2 processes
Runtime:
"Process A" starts "Process B".
Process B stops Process A, executes some business logic, and then restarts Process A.
The above 2 steps are repeated every hour.
Problem:
First time when Process A starts Process B, it works as expected.
But next time when the Process A tries to start Process B, it only open the node console. It does not execute the JS file.
Observation:
in first iteration, js path is coming as a process argument to my JS process
but in subsequent iteration, js path is not coming as argument, which essentially means, in subsequent iterations the started
process is just node console
The text was updated successfully, but these errors were encountered: