prctl(1) on Solnix vs Linux and the BSDs

prctl is the illumos command at /usr/bin/prctl. It gets or sets resource controls on a running process, task, project or zone, selected by id. Linux prlimit and FreeBSD rctl do similar jobs under different names and models, so no flags carry over; even the same letters (-n, -r) mean different things.

What Solnix runs

A default Solnix system runs the illumos prctl at /usr/bin/prctl, published in pkgs.solnix.illumos-world-man. No other variants are shipped. The bundle has no OpenBSD or NetBSD counterpart page, so nothing is said about them. See resource_controls(7) for the list of controls and rctladm(8) for the global side.

Differences

Compared withTopicWhat differs
Linux, FreeBSDwhat is controlledprctl -i idtype takes process (default), task, project or zone ids. prlimit works on one process (--pid) or on a command it runs. FreeBSD rctl rules have a subject of process, user, loginclass or jail.
Source: Solnix prctl(1) -i; Linux prlimit(1) SYNOPSIS, DESCRIPTION; FreeBSD rctl(8) -u
Linuxlimit modelprctl values have a type chosen with -t: basic, privileged or system (basic is assumed when setting). prlimit changes a soft:hard pair, where soft must not exceed hard.
Source: Solnix prctl(1) -t; Linux prlimit(1) DESCRIPTION
FreeBSDrules versus live valuesFreeBSD rctl manages a database of rules, and changing a rule affects all running and future matching processes. The prctl page describes examining and modifying controls on an active entity and does not mention a rule database.
Source: FreeBSD rctl(8) NAME, DESCRIPTION; Solnix prctl(1) DESCRIPTION
Linuxrunning a command under a limitprlimit can run a command with the given limits. The prctl synopsis only takes ids of existing processes, tasks, projects or zones, and an id is required.
Source: Linux prlimit(1) SYNOPSIS, DESCRIPTION; Solnix prctl(1) SYNOPSIS, OPERANDS
FreeBSD-n and -r meaningsIn prctl, -n names the resource control and -r replaces a value. In rctl, -n shows user IDs numerically and -r removes matching rules. On Solnix, deleting a value is -x.
Source: Solnix prctl(1) -n, -r, -x; FreeBSD rctl(8) -n, -r
FreeBSDoutput optionsprctl -P prints values space delimited, and its parsable output is Committed. rctl -h prints human-readable units (Byte to Petabyte). The prctl page has no -h.
Source: Solnix prctl(1) -P, ATTRIBUTES; FreeBSD rctl(8) -h
Linux, FreeBSDget versus modifyprctl treats an invocation as a get unless -s, -r, -x, -v, -d or -e is given. -v alone implies -s. -s needs -v. rctl uses separate options (-a, -r, -l, -u).
Source: Solnix prctl(1) OPTIONS -s, OPTIONS (final paragraph); FreeBSD rctl(8) SYNOPSIS
Linux, FreeBSDactions on exceeding a valueprctl -e or -d enables or disables an action (all, deny, signal, signal=signum) on a value. The prlimit and rctl texts in the bundle describe no equivalent option.
Source: Solnix prctl(1) -d | -e action; Linux prlimit(1) DESCRIPTION; FreeBSD rctl(8) OPTIONS
Linux, FreeBSDprivilege to modifyChanging privileged controls with prctl needs root-equivalent privileges unless the lowerable flag is set. An unprivileged user querying an entity with different credentials gets a failure. The other two pages do not describe privilege requirements.
Source: Solnix prctl(1) -t, OPERANDS; Linux prlimit(1); FreeBSD rctl(8)
Linux, FreeBSDexit statusprctl exits 0 on success, 1 on a fatal error and 2 for invalid options. rctl documents only 0 and >0. The prlimit page in the bundle has no exit status section.
Source: Solnix prctl(1) EXIT STATUS; FreeBSD rctl(8) EXIT STATUS; Linux prlimit(1)

Everyday tasks

TaskSolnixLinuxFreeBSD
show limits of a processprctl pidprlimit --pid PIDrctl -l filter
show one named limitprctl -n name pidprlimit --resource=limits --pid PIDrctl filter
set a limit on a running processprctl -n name -v value -p pid idprlimit --resource=soft:hard --pid PIDrctl -a rule
remove a limitprctl -x -n name id—rctl -r filter
show current resource usageprctl id—rctl -u filter
limits of a task, project or zoneprctl -i task|project|zone id—rctl -u filter (subject user, loginclass or jail)
machine-readable outputprctl -P——

Standards

  • POSIX: prctl is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: the command-line syntax is Committed, the human-readable output is Uncommitted, and the parsable output is Committed.
  • Linux: The prlimit(1) page refers to ulimit(1p) and prlimit(2) in SEE ALSO and says prlimit(2) is supported since Linux 2.6.36.
  • FreeBSD: The rctl command appeared in FreeBSD 9.0. The page cites no standard.

Writing portable scripts

  • There is no portable flag set: branch on the tool present (prctl, prlimit, rctl) and write each branch separately.
  • On Solnix, parse prctl -P output rather than the default output, since only the parsable output is Committed.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.