All Projects → saleyn → Erlexec

saleyn / Erlexec

Licence: other
Execute and control OS processes from Erlang/OTP

Programming Languages

erlang
1774 projects

Projects that are alternatives of or similar to Erlexec

Awesome Programming Books
📚 经典技术书籍推荐,持续更新...
Stars: ✭ 3,472 (+724.7%)
Mutual labels:  os
Ghost
Ghost, a micro-kernel based hobby operating system for the x86 architecture.
Stars: ✭ 353 (-16.15%)
Mutual labels:  os
Mineos
Home of MineOS and it's software for OpenComputers mod
Stars: ✭ 381 (-9.5%)
Mutual labels:  os
Ex rated
ExRated, the Elixir OTP GenServer with the naughty name that allows you to rate-limit calls to any service that requires it.
Stars: ✭ 328 (-22.09%)
Mutual labels:  otp
30daymakeos
《30天自制操作系统》源码中文版。自己制作一个操作系统(OSASK)的过程
Stars: ✭ 4,127 (+880.29%)
Mutual labels:  os
Qword
Operating system for x86_64 based around a "keep it simple and make it work" philosophy.
Stars: ✭ 367 (-12.83%)
Mutual labels:  os
Sel4
The seL4 microkernel
Stars: ✭ 3,344 (+694.3%)
Mutual labels:  os
Aquila
AquilaOS: UNIX-like Operating System
Stars: ✭ 413 (-1.9%)
Mutual labels:  os
Interviewguide
计算机校招、社招面试八股文整理,也是《逆袭进大厂》唯一仓库,目前已收录 C/C++ 、操作系统、数据结构、计算机网络、MySQL、Redis等面试资料,未来打算继续收录Java、Python、Go等面试常见问题,坚持将此仓库维护下去。
Stars: ✭ 288 (-31.59%)
Mutual labels:  os
Ergo
a Framework for creating mesh networks using technologies and design patterns of Erlang/OTP in Golang
Stars: ✭ 376 (-10.69%)
Mutual labels:  otp
Rust Raspberrypi Os Tutorials
📚 Learn to write an embedded OS in Rust 🦀
Stars: ✭ 7,275 (+1628.03%)
Mutual labels:  os
Yubikey Manager
Python library and command line tool for configuring any YubiKey over all USB interfaces.
Stars: ✭ 351 (-16.63%)
Mutual labels:  otp
Gamer Os
A Steam Big Picture based couch gaming OS
Stars: ✭ 366 (-13.06%)
Mutual labels:  os
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+1013.3%)
Mutual labels:  os
Riot
RIOT - The friendly OS for IoT
Stars: ✭ 4,029 (+857.01%)
Mutual labels:  os
Cloud Kernel
Cloud Kernel - an open-source Linux kernel originated by Alibaba Operating System Team
Stars: ✭ 295 (-29.93%)
Mutual labels:  os
Wingos
a little 64bit operating system written in c++ with smp support
Stars: ✭ 361 (-14.25%)
Mutual labels:  os
Mapos
Sistema de Controle de Ordens de Serviço
Stars: ✭ 421 (+0%)
Mutual labels:  os
Xboot
The extensible bootloader for embedded system with application engine, write once, run everywhere.
Stars: ✭ 405 (-3.8%)
Mutual labels:  os
Cs Wiki
🎉 致力打造完善的 Java 后端知识体系,不仅仅帮助各位小伙伴快速且系统的准备面试,更指引学习的方向
Stars: ✭ 369 (-12.35%)
Mutual labels:  os

erlexec

Build Status Hex.pm Hex.pm

Execute and control OS processes from Erlang/OTP.

This project implements an Erlang application with a C++ port program that gives light-weight Erlang processes fine-grain control over execution of OS processes.

The following features are supported:

  • Start/stop OS commands and get their OS process IDs, and termination reason (exit code, signal number, core dump status).
  • Manage/monitor externally started OS processes.
  • Execute OS processes synchronously and asynchronously.
  • Set OS command's working directory, environment, process group, effective user, process priority.
  • Provide custom termination command for killing a process or relying on default SIGTERM/SIGKILL behavior.
  • Specify custom timeout for SIGKILL after the termination command or SIGTERM was executed and the running OS child process is still alive.
  • Link an Erlang processes to OS processes (via intermediate Erlang Pids that are linked to an associated OS process).
  • Monitor termination of OS processes.
  • Terminate all processes beloging to an OS process group.
  • Kill processes belonging to an OS process group at process exit.
  • Communicate with an OS process via its STDIN.
  • Redirect STDOUT and STDERR of an OS process to a file, erlang process, or a custom function. When redirected to a file, the file can be open in append/truncate mode, and given creation access mask.
  • Run interactive processes with psudo-terminal pty support.
  • Execute OS processes under different user credentials (using Linux capabilities).
  • Perform proper cleanup of OS child processes at port program termination time.

This application provides significantly better control over OS processes than built-in erlang:open_port/2 command with a {spawn, Command} option, and performs proper OS child process cleanup when the emulator exits.

The erlexec application has been in production use by Erlang and Elixir systems, and is stable.

See http://saleyn.github.com/erlexec for more information.

Donations

If you find this project useful, please donate to:

  • Bitcoin: 12pt8TcoMWMkF6iY66VJQk95ntdN4pFihg
  • Ethereum: 0x268295486F258037CF53E504fcC1E67eba014218

SUPPORTED OS's

Linux, Solaris, FreeBSD, OpenBSD, MacOS X

DOCUMENTATION

See http://saleyn.github.io/erlexec

BUILDING

Make sure you have rebar (http://github.com/basho/rebar or http://github.com/basho/rebar3) installed locally and the rebar script is in the path.

If you are deploying the application on Linux and would like to take advantage of exec-port running tasks using effective user IDs different from the real user ID that started exec-port, then either make sure that libcap-dev[el] library is installed or make sure that the user running the port program has sudo rights.

OS-specific libcap-dev installation instructions:

  • Fedora, CentOS: "yum install libcap-devel"
  • Ubuntu: "apt-get install libcap-dev"
$ git clone [email protected]:saleyn/erlexec.git
$ make

# NOTE: for disabling optimized build of exec-port, do the following instead:
$ OPTIMIZE=0 make

By default port program's implementation uses poll(2) call for event demultiplexing. If you prefer to use select(2), set the following environment variable:

$ USE_POLL=0 make

LICENSE

The program is distributed under BSD license. Copyright (c) 2003 Serge Aleynikov

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].