# Copyright 2026 SigmaSRC, Inc. All Rights Reserved.

"""Process management abstractions.

This supports the following APIs:

- obj = createProcess(args: list<str>, env: dict<str,str> = None)
- obj = Process(pid: int)

The object returned has the following methods

- obj.getpid() -> int
- obj.kill(how: int = 0)
- obj.() -> bool
- obj.wait()
- obj.getstatus() -> int # -1 if still active

Also:

- Error: the exception createProcess() or Process methods may raise

"""

import os

if os.name == "nt":
    from sigma.sched.winprocess import Process, createProcess, Error
else:
    from sigma.sched.unixprocess import Process, createProcess, Error
