Closed plasorak closed 6 months ago
With the last 2 commits, we can now specify
"command_address": "localhost:0",
In the Process manager json, so that we don't need to assign port ourselves for the process manager server.
Once I added the the import statement I tested it and the unified shell worked
Also works with K8s pm
With this PR, one doesn't need to have 2 terminal windows open simultaneously to start the
drunc-unified-shell
, as the shell directly starts the process manager in amultiprocess.Process
. To get this to work correctly, there is quite a bit of bookkeeping of the signal that needs to happen (not that on Linux themultiprocess.Process
are forks):nanorc
's SSHPM), and sendsSIGKILL
to the forked process when the main gets one.SIGINT
(for example,ctrl-c
from a user in the shell), this signal gets propagated to the forked process, so the fork needs to catch and ignore that signal in the case it runs with the unified shell.That's all folks!