Skip to content

Enhancement: list children of a specific toolbox instance #399

Open
@zerodogg

Description

I would like to be able to list the child processes that are running in a specific toolbox instance.

My use case is as follows: I run tmux on my host (silverblue). The tmux spawns a bunch of toolbox shells. I would like to have a tmux binding that creates a new toolbox shell in the working directory of my active pane. Usually I could use tmux's internal variables for this, but because the child of tmux is toolbox rather than the shell within toolbox, the cwd of that never changes. I also can't switch to just running tmux inside of toolbox, since I want to be able to open a non-toolbox shell within the tmux instance to run commands on the host.

If I could, given the PID of a 'toolbox enter' process, get a list of processes within that (or just the one that has control of the terminal), I could read that process' working directory from a script and change to it before running a new 'toolbox enter'. A bit convoluted, perhaps.

At the moment simply walking through /proc finding child processes doesn't work, since that tree ends at the 'conmon' process (which may or may not be defunct, it seems).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions