Skip to main content

Wait PID Wrapper

Introduction

Start a process and store the process identifier in a pid file (wait-pid-wrapper-exec).

The pid file then can be awaited until the process ends (wait-pid-wrapper-waitpid).

This is useful for running a normal process as a service using SystemD, preventing it from running concurrently or running for infinity.

SystemD is capable of running processes as a service but it cannot gracefully timeout (AFAIK).

You can either set KillSignal to something harmless or KillMode=none but then SystemD doesn't timeout the process.

Usage

The following SystemD unit starts a sleep process with the following behavior:

command is sleep running? behavior
systemctl start mysleep no start sleep
systemctl start mysleep yes sleep is already running
systemctl stop mysleep no nothing happens, sleep is not running
systemctl stop mysleep yes wait until sleep has finished, allow timeout to forcefully stop the process
[Unit]
Description=My sleep

[Service]
Type=exec
ExecStart=waitpidwrapper-exec mysleep sleep 9999
ExecStop=waitpidwrapper-waitpid mysleep

Metadata

Release files for wait-pid-wrapper 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wait-pid-wrapper 0.1.0
File Size Uploaded Provenance
wait_pid_wrapper-0.1.0.tar.gz 1.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wait-pid-wrapper 0.1.0
File Interpreter ABI Platform
wait_pid_wrapper-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / wait_pid_wrapper-0.1.0.tar.gz

Download URL wait_pid_wrapper-0.1.0.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d13f20307da54fa3d4f4a2d2d6f72869ae1b9408d633fb5dbb5a5a5ae9b15d24
BLAKE2b-256 checksum
How to use checksums
82dd34b7ffc48410e093efb8dce06b9774970245f56288e8a31b2a9dbc435a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.5 Linux/6.10.6-200.fc40.x86_64

Release files / wait_pid_wrapper-0.1.0-py3-none-any.whl

Download URL wait_pid_wrapper-0.1.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9eb630ef04cd7e0c33e335548f6f1d2f003324df0d6291581da5e4b72c9e150f
BLAKE2b-256 checksum
How to use checksums
2d18d3821a7aefdb6350557d3b2d8863829d9cf9db8d9f57f7a93a5e1e285b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.5 Linux/6.10.6-200.fc40.x86_64

Security for wait-pid-wrapper 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page