Metadata-Version: 2.4
Name: proclaunch
Version: 0.1.0
Summary: Start, stop and supervise long-running background processes with a contract (implements commandport).
Author: Brian Powers
License-Expression: MIT
Project-URL: Homepage, https://github.com/112345brian/launch-runner
Project-URL: Repository, https://github.com/112345brian/launch-runner
Project-URL: Issues, https://github.com/112345brian/launch-runner/issues
Keywords: subprocess,process,daemon,service,windows,task-scheduler
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: commandport==0.1.0
Requires-Dist: psutil>=5.9
Dynamic: license-file

# proclaunch

Start and stop long-running local background processes, detached and windowless, with process identity (pid *and*
creation time), exclusive start reservations, readiness probes and an optional OS supervisor (Windows Task
Scheduler). It implements `commandport`'s `BackgroundLauncher` / `Supervisor`.

```python
from commandport.domain import ProcessSpec
from proclaunch.api import launch_background, start_service, stop_service

result = launch_background(ProcessSpec(("python", "-m", "myapp")))   # a LaunchResult; never raises
if not result.ok:
    print(result.error)
```

A named service (`ProcessSpec(name=...)`) is recorded so a second start is `ALREADY_RUNNING`, and a stop only acts
when the recorded identity still matches (a reused pid is left alone).

Tests: bind `commandport.testing.FakeLauncher` with `proclaunch.api.use_launcher(...)` and
`FakeSupervisors` with `use_supervisor(...)`.
