exec(1) on Solnix vs Linux and the BSDs

On Solnix, exec is a shell built-in, not a separate binary. The Solnix page documents it for sh, csh, ksh and ksh93. The FreeBSD exec(1) page is only an index of csh and sh built-ins, so it does not describe exec behaviour or options.

What Solnix runs

A default Solnix system has no exec binary on PATH. exec, eval and source are built into sh, csh, ksh and ksh93, and each shell's synopsis differs. Only ksh93 exec takes options (-c, -a name). The page is published by pkgs.solnix.illumos-world-man and no other variants are shipped.

Differences

Compared withTopicWhat differs
FreeBSDwhat the page documentsThe Solnix exec(1) page describes exec, eval and source semantics per shell. FreeBSD exec(1) has the NAME 'builtin, keybinds' and is an index table of built-ins. It gives no exec syntax, options or exit status.
Source: Solnix exec(1) NAME, SYNOPSIS; FreeBSD exec(1) NAME, DESCRIPTION (Commands table)
FreeBSD-c and -a optionsSolnix ksh93 exec accepts -c, which clears the environment except assignments on the exec command, and -a name, which sets argv[0]. The FreeBSD page documents no exec options. The bundle shows no such options for csh or sh on either system.
Source: Solnix exec(1) OPTIONS (ksh93 -a, -c); FreeBSD exec(1) SYNOPSIS
FreeBSDshells that provide execThe FreeBSD table lists exec as built into csh and sh and not standalone. Solnix lists exec in sh, csh, ksh and ksh93. The FreeBSD page mentions neither ksh nor ksh93.
Source: FreeBSD exec(1) Commands table (exec: No, Yes, Yes); Solnix exec(1) SYNOPSIS
FreeBSDsource built-inSolnix documents source in this page for csh as 'source [-h] name'. -h puts the file's commands on the history list without executing them. The FreeBSD table lists source for csh only, not sh, and the page gives no options for it.
Source: Solnix exec(1) SYNOPSIS csh, DESCRIPTION csh -h; FreeBSD exec(1) Commands table (source: csh Yes, sh No)
FreeBSDexec failure in scriptsOn Solnix ksh93, exec is a special built-in, so a failure makes the invoking script exit. Calling it through the command utility prevents this. The FreeBSD page says nothing about failure behaviour.
Source: Solnix exec(1) DESCRIPTION ksh93; FreeBSD exec(1) DESCRIPTION
FreeBSDexit statusSolnix ksh exec returns 1-125 for a redirection error, 127 if the command is not found and 126 if it is found but not executable. ksh93 exec returns 0 or >0 and does not return when a command is given. The FreeBSD page gives no exit values.
Source: Solnix exec(1) EXIT STATUS (ksh, ksh93); FreeBSD exec(1)
FreeBSDfile descriptors left openSolnix ksh and ksh93 exec with no command changes file descriptors in the current shell. Descriptors above 2 opened this way are closed when another program is invoked (close-on-exec). The FreeBSD page does not describe this.
Source: Solnix exec(1) DESCRIPTION ksh, ksh93; FreeBSD exec(1) DESCRIPTION
Linux, OpenBSD, NetBSDno counterpart page in the bundleThe bundle has no Linux, OpenBSD or NetBSD page for exec. The manual text provided supports no comparison with those systems.
Source: Bundle header (only COUNTERPART freebsd listed)

Standards

  • POSIX: exec is not listed as a POSIX.1-2024 utility in the bundle header.
  • Solnix: The ATTRIBUTES table is empty in the bundle text, so no interface stability is shown.

Writing portable scripts

  • Use only plain 'exec command [argument]...' and redirection-only 'exec' in portable scripts. -c and -a exist only in Solnix ksh93, and the FreeBSD page documents no options.
  • Do not assume exec is an external program. It is a shell built-in, so 'env' or a path lookup will not find a binary.

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.