---
title: ProcGroup
description: "One exec's process group, as GET /v1/procs reports it."
---

```python
@final
class ProcGroup
```

One exec's process group, as `GET /v1/procs` reports it.

`child_exited` beside a non-empty `pids` is the shape worth reading: a command that
finished while something it backgrounded did not, which `Health.busy` cannot show.
The `exec_id` beside it is what `Session.kill` takes.

## Constructor

`ProcGroup` declares no `__new__` or `__init__`, so it is not constructed directly: an instance comes back from another call in this package.

## Properties

### `child_exited`

```python
child_exited: bool
```

Whether the exec's own child has exited. An acked exec still reads `True`.

### `exec_id`

```python
exec_id: str
```

The exec this group belongs to — what `Session.kill` takes.

### `pgid`

```python
pgid: int | None
```

The process group id captured at spawn, or `None` when the child was reaped before
it could be read (then `pids` is empty: there is no group to scan for).

### `pids`

```python
pids: list[int]
```

Live pids whose process group is `pgid`, read from `/proc` inside the guest.
Zombies are not listed. Empty once the group is gone.

### `reap`

```python
reap: bool
```

Whether the exec was started with `reap_group_on_exit`.

### `started_at`

```python
started_at: int
```

Seconds since the epoch on the daemon's clock when the child was spawned.

## Special methods

### `__repr__`

```python
def __repr__() -> str
```

## Provenance

This page is generated from `bindings/microvms-py/microvms.pyi` by Griffe 2.3.0, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run stubs`. `mise run stubs:check` fails when the committed file no longer matches the source.