Support getting TIDs (thread IDs) on thread mode

Open
#3,616 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
go

Research direction

Start with the Manager interface in libcontainer/cgroups/cgroups.go and inspect the existing GetPids() and GetAllPids() implementations. Add thread-ID support for threaded mode using the V1 and V2 paths named in the issue, then verify that the new behavior works for both cgroup versions.

Written by the indexing model from the issue text.

Description

Currently the Manager interface supports only GetPids() and GetAllPids() methods, and there is not support for getting the TIDs of threads when running on threaded mode. This is important since for anyone that is using thread mode, GetPids() and GetAllPids() are useless.

Implementation-wise this should be relatively straight-forward to implement. All needs to be done is:
V1: to read from "tasks" insead of "processes"
V2: to read from "cgroup.threads" insead of "cgroup.procs"

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from opencontainers/runc

All issues in opencontainers/runc

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.