Description
erlexec is an Erlang/OTP application for executing and controlling operating system processes from Erlang code. It uses a C++ port program so that lightweight Erlang processes can manage OS processes with fine-grained control. You can start and stop OS commands, get their OS process IDs, and read the termination reason, including exit code, signal number and core-dump status. Commands run synchronously or asynchronously, with a working directory, environment, process group, effective user and priority set. Erlang processes can be linked to OS processes so that one side's termination ends the other, and erlang:monitor/2 reports when an OS process exits. You can write to a process's STDIN, redirect STDOUT and STDERR to a file, an Erlang process or a custom function, and run interactive programs in a pseudo-terminal using the RFC 4254 PTY options. A custom termination command can replace the default SIGTERM and SIGKILL behavior, with a timeout for SIGKILL. Commands with Unicode characters are supported, and the README lists supported platforms and documentation.…
Highlights
- Start, stop and monitor OS processes from Erlang
- Exit codes, signals and core-dump status
- Pseudo-terminal support with RFC 4254 PTY options
- Redirect STDOUT and STDERR to files or functions
- Custom termination commands and timeouts
Ratings & Reviews
No ratings yet
Be the first to rate Erlexec.
People also visit
Erlexec FAQ
What is erlexec?
An Erlang/OTP application that starts, controls and monitors operating system processes from Erlang code.
How does it work?
A C++ port program runs the OS processes, so lightweight Erlang processes can control them with fine-grained options.
Can it run interactive programs?
Yes. It can run programs in a pseudo-terminal using the RFC 4254 PTY options, and you can send input over STDIN.
What happens when a process exits?
You can link Erlang processes to OS processes so that termination propagates, or monitor an OS process with erlang:monitor/2 to see its exit.
Is it open source?
The source is public on GitHub at saleyn/erlexec.
What are the best Erlexec alternatives?
Popular alternatives to Erlexec include Otp, Monitor and Packages. See all Erlexec alternatives




