Commit graph

72 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
2a6a246ff4 Remove getdomainname(2). 2016-05-15 22:43:29 +02: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
8e988c1bf1 Convert libpthread to C and merge into libc. 2016-03-03 23:02:23 +01:00
Jonas 'Sortie' Termansen
fbfe159046 Add crypt_checkpass(3) and crypt_newhash(3). 2016-01-09 02:54:51 +01:00
Jonas 'Sortie' Termansen
a79aeed0c1 Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
Jonas 'Sortie' Termansen
5915e2cd14 Add closefrom(2). 2015-08-26 14:01:25 +02:00
Jonas 'Sortie' Termansen
5143f01b0a Remove sbrk(2).
Note: This is an incompatible ABI change.
2014-12-03 23:55:55 +01:00
Jonas 'Sortie' Termansen
3ad7ab4fc3 Add gethostname(2) and sethostname(2). 2014-12-03 13:58:29 +01:00
Jonas 'Sortie' Termansen
392472af5c Add semaphores API. 2014-11-30 19:31:40 +01:00
Jonas 'Sortie' Termansen
e460be7a72 Add getentropy(2). 2014-11-28 13:35:51 +01:00
Jonas 'Sortie' Termansen
3760420fbb Add fpathconf(2). 2014-11-27 01:36:52 +01:00
Jonas 'Sortie' Termansen
bb84370c34 Add type limits and print/scan specifiers to <sys/types.h>. 2014-11-26 23:34:14 +01:00
Jonas 'Sortie' Termansen
95491e44ac Honor feature macros in <unistd.h>. 2014-11-20 21:09:15 +01:00
Jonas 'Sortie' Termansen
fbbb33287b Implement standard library feature macros. 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen
30cd318c17 Implement signals.
Note: This is an incompatible ABI change.
2014-07-22 13:25:39 +02:00
Jonas 'Sortie' Termansen
4ea6aa710c Add exit_thread(2). 2014-06-12 00:05:40 +02:00
Jonas 'Sortie' Termansen
580418341c Fix getpagesize(2) visibility in <unistd.h>. 2014-04-05 17:04:48 +02:00
Jonas 'Sortie' Termansen
d50e8f1bce Document gethostid(3) and sethostid(3) as obsolete. 2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
4ee83c9466 Refuse to implement broken POSIX advisory file locks. 2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
c6978d7d6e Add getdomainname(2). 2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
e91cde379a Rewrite getenv(3), setenv(3), unsetenv(3) and clearenv(3). 2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
f34279cc60 Add ttyname_r(3). 2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
a0a8ed61d8 Add pipe2(2). 2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
b08455c4d3 Remove mxmpp. 2014-03-01 14:37:40 +01:00
Jonas 'Sortie' Termansen
500d3bb38b Add symlink(2) and symlinkat(2) stub. 2013-12-19 17:42:08 +01:00
Jonas 'Sortie' Termansen
30a95dfa1e Split parts of <features.h> into <sys/cdefs.h>. 2013-12-17 14:30:44 +01:00
Jonas 'Sortie' Termansen
396765eaba Remove getdtablesize(3).
This interface has been replaced with sysconf(_SC_OPEN_MAX). Note that this
implementation currently reports this as 0x10000, but there really is no
such limit in Sortix at this time.
2013-12-17 14:30:43 +01:00
Jonas 'Sortie' Termansen
a212ec0ee3 Split libc/unistd/ioleast.cpp into multiple files. 2013-12-17 14:30:43 +01:00
Jonas 'Sortie' Termansen
b399ece14b Add dup3(2). 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
9700623737 Remove obsolete __SORTIX_SHOW_UNIMPLEMENTED feature macro. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
ad1c6e0ed7 Remove <sys/__/types.h> inclusion from <features.h>. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
f79508fbc9 Remove __POSIX_OBSOLETE feature macro. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
d5a7901b25 Add getopt(3) and getopt_long(3). 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
938f722dcb Add tcsetpgrp(2) and tcgetpgrp(2). 2013-12-17 14:30:36 +01:00
Jonas 'Sortie' Termansen
be0ece3fe0 Add setpgid(2) and getpgid(2). 2013-12-17 14:30:36 +01:00
Jonas 'Sortie' Termansen
5d1fe2620b Add mkpartition(2). 2013-12-17 14:30:36 +01:00
Jonas 'Sortie' Termansen
d2aab888d1 Add chroot(2), fchroot(2) and fchrootat(2). 2013-12-17 14:30:35 +01:00
Jonas 'Sortie' Termansen
ddf3dd329f Add fchdirat(2). 2013-12-17 14:30:35 +01:00
Jonas 'Sortie' Termansen
a15ffa955b Obsolete uptime(2). 2013-12-17 14:30:34 +01:00
Jonas 'Sortie' Termansen
2d94cd1246 Add alarm(2) and alarmns(2). 2013-12-17 14:30:33 +01:00
Jonas 'Sortie' Termansen
29df8b3092 Add confstr(3). 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
5260d22492 Simplify STDFOO_FILENO macros. 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
2b3f3d0bc4 Add sysconf(3). 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
f1fb806f72 Add getlogin(2) and getlogin_r(2). 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
57003dd777 Add gethostname(2). 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
3eeec255c0 Use alternate restrict keyword when unavailable. 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen
01a82b2882 Add ttyname(2). 2013-12-17 14:30:30 +01:00
Jonas 'Sortie' Termansen
c6d1285337 Add pathconf(3). 2013-12-17 14:30:30 +01:00
Jonas 'Sortie' Termansen
ade239f18b Add {g,s}et{e,}{g,u}id(2). 2013-12-17 14:30:29 +01:00