mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add tracking for exec session IDs
Exec sessions now have an ID generated and assigned to their PID and stored in the database state. This allows us to track what exec sessions are currently active. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
This commit is contained in:
@ -20,6 +20,11 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
|
||||
args = args[1:]
|
||||
}
|
||||
|
||||
execIDs := []string{}
|
||||
for id, _ := range c.state.ExecSessions {
|
||||
execIDs = append(execIDs, id)
|
||||
}
|
||||
|
||||
data := &inspect.ContainerInspectData{
|
||||
ID: config.ID,
|
||||
Created: config.CreatedTime,
|
||||
@ -50,7 +55,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
|
||||
MountLabel: config.MountLabel,
|
||||
ProcessLabel: spec.Process.SelinuxLabel,
|
||||
AppArmorProfile: spec.Process.ApparmorProfile,
|
||||
ExecIDs: []string{}, //TODO
|
||||
ExecIDs: execIDs,
|
||||
GraphDriver: driverData,
|
||||
Mounts: spec.Mounts,
|
||||
NetworkSettings: &inspect.NetworkSettings{
|
||||
|
Reference in New Issue
Block a user