Skip to main content

No project description provided

Project description

Logo

Parent is a simple wrapper that allows you to run a program with limited resources and access.

Available options

Resource limits

The resources available for the program can be limited using these options. The limits are enforced using the Linux kernel's rlimit.

Option Description
-m / --memory N The program's maximum memory address space in kilobytes.
-t / --cpu-time N The program's maximum CPU time in milliseconds.
-r / --real-time N The program's maximum real-time execution time in milliseconds.
--stack N The program's stack size limit in kilobytes. (-1 for unlimited)
-f / --file-size N The program's maximum file size in kilobytes that it can create or modify.
-p / --processes N The number of threads, or processes, the program can use.

I/O

Program's stdin, stdout, and stderr will by default be redirected to parent's. You can change this behaviour using these options.

Option Description
--stdin FILE Redirect a file to the program's stdin.
--stdout FILE Redirect the program's stdout to a file.
--stderr FILE Redirect the program's stdout to a file.
--stderr-to-stdout Redirect the program's stderr to stdout.

File access

The program can access any file on the system by default. You can use these settings to restrict its access. Make sure you at least allow access to the program itself, since if you enable any of these options, the default behavior will be to prevent access to any files. File access is limited using Linux kernel's landlock. These options can be used multiple times to allow access to multiple paths.

Option Description
--fs-readonly PATH Allow the program read from files located under the provided path.
--fs-readwrite PATH Allow the program write to files located under the provided path.

Environment

The program inherits environment variables by default. It is possible to disable default inheritance and pass additional environment variables.

Option Description
--env NAME VALUE Set an environment variable.
--empty-env Do not inherit environment.

Miscelaneous options

Option Description
--drop-caps Drop the program's capabilities.
-s / --stats FILE Save execution statistics to a file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parent-23.1004.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

parent-23.1004-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page