aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys_uds.c
AgeCommit message (Collapse)Author
2018-09-29SELinux is another cause of MSG_CTRUNCAlexander Clouter
https://github.com/termux/termux-packages/issues/2882
2018-07-30erts: Handle EMFILE errors in forker_driver for writeLukas Larsson
Before this change, if a write to the uds failed due to EMFILE to ETOOMANYREFS the entire vm would crash. This change makes it so that an SIGCHLD is simulated to that the error is propagated to the user instead of terminating the VM.
2018-06-18Update copyright yearHenrik Nord
2018-03-20erts: Make sys_memcpy and friends inline functionsSverker Eriksson
to avoid argument-evaluated-twice bugs like in macro DMC_PUSH. Had to shuffle around some #include and #define to make erl_child_setup build debug target.
2016-03-15update copyright-yearHenrik Nord
2015-12-15erts: Fix uds socket handling for os xLukas Larsson
OS X is very strict in what it requires of you and also gives strange error codes for some errors. In this commit we remap EMSGSIZE to EMFILE and also precisely tune the amount of data we send on the socket so that we can recv only that data. If we try to recv more, recvmsg fails with EPIPE if the remote end has been closed.
2015-12-15erts: Flatten too long io vectors in uds writeLukas Larsson
2015-12-15erts: Create forker process for spawn driverLukas Larsson
Instead of forking from the beam process, we create a separate process in which all forks are done. This has several advantages: 1) performance: * don't have to close all fd's in the world * fork only has to copy stuff from a small process * work is done in a completely seperate process * a 3x performance increase has been measured, can be made even greater (10x) if we cache the environment in child setup 2) stability * the exec is done in another process than beam, which means that if the file that we exec to is on an nfs that is not available right now we will not block a scheduler until the nfs returns. 3) simplicity * don't have to deal with SIGCHLD in the erts Unfortunately, this solution also implies some badness. 1) There will always be a seperate process running together with beam on unix. This could be confusing and undesirable. 2) We have to transfer the entire environment to child_setup for each command. OTP-13088