Commit Graph

21 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 e8a9d3dc04 Fix code assuming struct winsize fields are size_t. 2018-08-06 23:59:35 +02:00
Jonas 'Sortie' Termansen d50b85591d Refactor testcase API. 2017-12-04 23:56:47 +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 2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +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