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 or folders located under the provided path.
--fs-writeonly PATH Allow the program write to files of folders located under the provided path.
--fs-readwrite PATH Allow the program read or write to files of folders 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.

Syscalls

The program cannot use kill syscall by default (to prevent it from sending SIGSTOP to parent) while --seccomp-default is not set. You can use these options to allow or deny certain syscalls.

Option Description
--seccomp-default POLICY Default policy for syscalls.
--seccomp-allow SYSCALL Allow certain syscalls.
--seccomp-deny SYSCALL Deny certain syscalls (return ERRNO 1).
--seccomp-kill SYSCALL Deny certain syscalls (kill process).

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-25.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parent-25.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file parent-25.2.tar.gz.

File metadata

  • Download URL: parent-25.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.16.8-arch3-1

File hashes

Hashes for parent-25.2.tar.gz
Algorithm Hash digest
SHA256 f9dda63e97b59b5a16454f18da2380245857911f909b716085cae1d3ae5104a2
MD5 dc37ed3314e48434e5ee26d106d9ced0
BLAKE2b-256 df591409e9292ce41f8b49397ea17e21bade85250d3201f29d1102803785ea15

See more details on using hashes here.

File details

Details for the file parent-25.2-py3-none-any.whl.

File metadata

  • Download URL: parent-25.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.16.8-arch3-1

File hashes

Hashes for parent-25.2-py3-none-any.whl
Algorithm Hash digest
SHA256 073780aa4fd6d415f9c4ba846864e1288eb5bac094297440842b31f707de324a
MD5 12833e6e46f30cbe8a937346ad5fc4de
BLAKE2b-256 d9360a5e7e562f1ae8db2bac3850c1c8c4a9746592821c98e2b9afc8e607abbb

See more details on using hashes here.

Supported by

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