1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

Userland: Add support for jails

This happens in two ways:
1. LibCore now has two new methods for creating Jails and attaching
   processes to a Jail.
2. We introduce 3 new utilities - lsjails, jail-create and jails-attach,
   which list jails, create jails and attach processes to a Jail,
   respectively.
This commit is contained in:
Liav A 2022-11-02 22:28:58 +02:00 committed by Andrew Kaster
parent 1d0066a5cc
commit 8d8b0d0a34
9 changed files with 174 additions and 0 deletions

View file

@ -0,0 +1,21 @@
## Name
jail-attach - attach a new process to existing jail
## Synopsis
```**sh
$ jail-attach <jail index> <command>
```
## Description
`jail-attach` attaches a new process by specifying a command, to an existing jail, with a
specified jail index.
## Examples
```sh
# Attach the command "ps -ef" to a jail with the index 0
$ jail-attach 0 ps -ef
```

View file

@ -0,0 +1,20 @@
## Name
jail-create - create a new jail
## Synopsis
```**sh
$ jail-create <name>
```
## Description
`jail-create` creates a new jail, with a specified name
## Examples
```sh
# Create jail with the name "test-jail"
$ jail-create test-jail
```

View file

@ -0,0 +1,22 @@
## Name
lsjails - list existing jails
## Synopsis
```**sh
# lsjails
```
## Description
This utility will list all existing jails at the moment of invoking this program.
Please note that if the current process is in jail, it will not see any jail.
## Examples
```sh
# lsjails
Index Name
2 test-jail
```