Documentation
¶
Overview ¶
Package pexec exposes process execution to PHP: the ref.exec.php functions that run a command through the shell, the two that quote for it, and posix_getpid and getmypid, which name the running process.
Running a command leaves the fs.FS sandbox behind on purpose. A process reads and writes with the permissions of the user running the server, and writable_paths does not reach it; a host that runs untrusted scripts leaves this package out. What the runtime does say is where a command starts, which is the working directory chdir() moved, resolved onto the host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register installs the process bindings rooted at the process working directory. A host serving scripts out of a project directory binds that instead, with RegisterRoot.
func RegisterRoot ¶ added in v0.5.0
RegisterRoot installs the process bindings with commands rooted at dir, the directory the filesystem shims are bound to. It replaces whatever root was installed before it, so a host calls it after stdlib.Register, the way stdlib.RegisterFS does for the filesystem.
An empty dir leaves a command in the process working directory, which is what a host that bound no directory of its own has to fall back to.
Types ¶
This section is empty.