aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys_drivers.c
AgeCommit message (Collapse)Author
2016-06-20erts: Fix spawn driver when env size is above pipe capacitySverker Eriksson
Symptom: open_port() succeeds, port program never starts but instead seem to terminate with exit_status 150 (EINVAL+128). When: If the command payload buffer (including the entire environment) for the port program is between 1 to 4 bytes above the pipe capacity, which is 65536 bytes on newer Linux, but can be as low as 4096 on older 32-bit Linux. Since: OTP-19.0-rc1.
2016-03-15update copyright-yearHenrik Nord
2016-02-24Merge branch 'master' into sverk/master/halt-INT_MINSverker Eriksson
2015-12-15erts: Only use forker StackAck on freebsdLukas Larsson
2015-12-15erts: Add forker StartAck for port start flowcontrolLukas Larsson
An acknowledgement of the Start command has to be managed as we have to make sure that packages are not dropped and also that the close calls do not happen too early.
2015-12-15erts: Move os_pid to port hash to child setupLukas Larsson
Had to move the hashing because of a race that can otherwise happen where a new os_pid value was inserted into the hash before the previous value had been removed. Also replaced the protocol inbetween erts and child setup to be a binary protocol. This was done in order to deal with the varying size of Eterm.
2015-12-15erts: Make child_setup work with large environmentsLukas Larsson
2015-12-15erts: Fix dereferencing of unaligned integer for sparcLukas 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
2015-12-15erts: Move sys drivers to another fileLukas Larsson