Commit Graph

18 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 3c43f71084 Implement file descriptor passing.
This change refactors the Unix socket / pipe backend to have a ring buffer
containing segments, where each segment has an optional leading ancillary
buffer containing control messages followed by a normal data buffer.

The SCM_RIGHTS control message has been implemented which transfers file
descriptors to the receiving process. File descriptors are reference counted
and cycles are prevented using the following restrictions:

1) Unix sockets cannot be sent on themselves (on either end).
2) Unix sockets themselves being sent cannot be sent on.
3) Unix sockets cannot send a Unix socket being sent on.

This is a compatible ABI change.
2021-12-31 22:24:11 +01:00
Jonas 'Sortie' Termansen ef2e478607 Implement getpeername(2) and getsockname(2). 2017-02-26 22:24:35 +01:00
Jonas 'Sortie' Termansen fcefd86432 Implement shutdown(2). 2017-02-18 15:29:40 +01:00
Jonas 'Sortie' Termansen 7a8a71674e Move readv/writev family and sendmsg/recvmsg into drivers. 2017-02-13 22:04:21 +01:00
Jonas 'Sortie' Termansen 00261ea9e1 Test if exit() works in a multi-threaded process.
Commit 2d91c7d385 fixed this issue.
2016-11-27 11:20:53 +01:00
Jonas 'Sortie' Termansen 8d58033846 Convert regress to C. 2016-03-03 23:02:24 +01:00
Jonas 'Sortie' Termansen 2586685061 Ongoing build system maintainance. 2014-12-02 17:09:28 +01:00
Jonas 'Sortie' Termansen 87be32b948 Remove obsolete uninstall Makefile target from projects. 2014-11-24 21:32:24 +01:00
Jonas 'Sortie' Termansen 9e6148f6ff Refactor default compiler options logic. 2014-11-24 17:10:50 +01:00
Jonas 'Sortie' Termansen dc73d0d7a1 Add test-fmemopen. 2014-11-17 19:18:16 +01:00
Jonas 'Sortie' Termansen ae364db284 Add test-pthread-argv. 2014-08-24 14:02:42 +02:00
Jonas 'Sortie' Termansen 9f2b0d7a26 Add test-pthread-main-join. 2014-08-24 14:02:42 +02:00
Jonas 'Sortie' Termansen 086a723575 Add test-signal-raise. 2014-08-24 14:02:42 +02:00
Jonas 'Sortie' Termansen 16839e19e4 Add test-pthread-once. 2014-08-24 14:02:42 +02:00
Jonas 'Sortie' Termansen decad94ab4 Add test-pthread-self. 2014-08-24 14:02:41 +02:00
Jonas 'Sortie' Termansen 5d59ab9b5e Add test-pthread-tls. 2014-08-24 14:02:41 +02:00
Jonas 'Sortie' Termansen 34a2c5822f Add test-pthread-basic. 2014-08-24 14:02:41 +02:00
Jonas 'Sortie' Termansen 6454d4d215 Add regress(1). 2014-08-24 14:02:41 +02:00