containers / containers/toolbox

Enhancement: list children of a specific toolbox instance

Open
#399 1 comment 0 reactions 0 assignees View on GitHub
1. Feature request 5. Help Wanted
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.