Commit Graph

32 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen db7182ddc3 Add support for sessions.
This change refactors the process group implementation and adds support
for sessions. The setsid(2) and getsid(2) system calls were added.

psctl(2) now has PSCTL_TTYNAME, which lets you get the name of a process's
terminal, and ps(1) now uses it.

The initial terminal is now called /dev/tty1.

/dev/tty is now a factory for the current terminal.

A global lock now protects the process hierarchy which makes it safe to
access other processes. This refactor removes potential vulnerabilities
and increases system robustness.

A number of terminal ioctls have been added.

This is a compatible ABI change.
2016-11-23 22:30:47 +01:00
Jonas 'Sortie' Termansen d529a1e332 Add factory inode support. 2016-11-23 21:46:06 +01:00
Jonas 'Sortie' Termansen c8487ff12b Fix readlinkat(2) return value truncation. 2016-09-28 20:15:36 +02:00
Jonas 'Sortie' Termansen 05282c86d7 Fix fchownat(2) system call ABI on x86.
This system call has five arguments, of which one is a 64-bit uid_t, and
another is a 64-bit gid_t, which means that 7 registers are needed. However,
x86 only has 5 registers available for system calls. Wrap the system call
with a structure like with mmap(2).
2016-03-26 23:28:36 +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 ede0571926 Add UTIME_NOW and UTIME_OMIT. 2016-02-24 17:32:05 +01:00
Jonas 'Sortie' Termansen b0bbf1e013 Fix fsm_mountat(2) error handling. 2016-01-27 21:36:04 +01:00
Jonas 'Sortie' Termansen 2e4b15daed Simplify directory reading. 2016-01-26 18:42:54 +01:00
Jonas 'Sortie' Termansen bff1265d62 Add termios(2). 2016-01-25 15:47:40 +01:00
Jonas 'Sortie' Termansen 9d3aecfa07 Work around sync on close bottleneck. 2016-01-08 01:25:10 +01:00
Jonas 'Sortie' Termansen 055f502c02 Fix dup3(2) O_CLOEXEC and O_CLOFORK handling. 2016-01-08 00:36:14 +01:00
Jonas 'Sortie' Termansen 875ce1adf7 Fix faccessat(2) not reporting correct permissions. 2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen 5915e2cd14 Add closefrom(2). 2015-08-26 14:01:25 +02:00
Jonas 'Sortie' Termansen aa09f8cecc Simplify kernel PrepareLookup. 2015-08-22 01:29:38 +02:00
Jonas 'Sortie' Termansen 5589085084 Fix unlinkat potentially following paths twice. 2015-06-27 17:06:32 +02:00
Jonas 'Sortie' Termansen bb70eef85b Replace system call array types with pointers. 2015-01-23 14:52:51 +01:00
Jonas 'Sortie' Termansen d890d3082d Add umount(2) and unmountat(2). 2014-12-26 21:45:29 +01:00
Jonas 'Sortie' Termansen dd950fc996 Add AT_EACCESS support to faccessat(2). 2014-12-03 14:19:58 +01:00
Jonas 'Sortie' Termansen ae4534aae1 Update kernel/descriptor.cpp to current coding conventions. 2014-12-03 14:19:58 +01:00
Jonas 'Sortie' Termansen ba1e0882ec Initialize system call table at compile time. 2014-12-03 14:19:49 +01:00
Jonas 'Sortie' Termansen bb3f591057 Add symbolic links. 2014-12-02 17:36:36 +01:00
Jonas 'Sortie' Termansen 536d7a06f5 Add fcntl(F_PREVFD) and fcntl(F_NEXTFD). 2014-12-01 21:39:05 +01:00
Jonas 'Sortie' Termansen 577f2f700b Add shutdown(2). 2014-11-27 01:39:53 +01:00
Jonas 'Sortie' Termansen a8a8154adc Add getpeername(2) and getsockname(2). 2014-11-27 01:39:11 +01:00
Jonas 'Sortie' Termansen 01402052f6 Add tcgetblob(2) and tcsetblob(2). 2014-11-25 18:40:50 +01:00
Jonas 'Sortie' Termansen a24ecf4b83 Add getsockopt(2) and setsockopt(2). 2014-11-18 18:10:22 +01:00
Jonas 'Sortie' Termansen 708bcb4735 Add recvmsg(2) and sendmsg(2). 2014-11-18 16:27:19 +01:00
Jonas 'Sortie' Termansen 933720e0b0 Remove obsolete system calls. 2014-09-25 17:49:02 +02:00
Jonas 'Sortie' Termansen 874baffd57 Fix wrongly named system call constants. 2014-06-27 15:49:55 +02:00
Jonas 'Sortie' Termansen a935148f60 Add statvfs(2), fstatvfs(2) and fstatvfsat(2). 2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen eaf1618537 Add tcgetwincurpos(2). 2014-03-17 19:22:10 +01:00
Jonas 'Sortie' Termansen 98a87fa1e5 Rename Sortix kernel directory to kernel. 2014-03-01 14:37:39 +01:00
Renamed from sortix/io.cpp (Browse further)