595 Commits

Author SHA1 Message Date
Theodore Dubois
fce3cc64c7 Implement dup3
Close #387
2019-07-05 17:57:43 -07:00
Theodore Dubois
c6e818b5c5 Include the reason for a segfault 2019-07-05 17:44:29 -07:00
Theodore Dubois
7b9371e1af Implement receiving of signals with siginfo 2019-07-04 12:51:36 -07:00
Theodore Dubois
006360fa5d Use a nonzero value for initial RLIMIT_NPROC and RLIMIT_SIGPENDING
It turns out the Linux kernel has them as 0 in the table, but then sets
them to max_threads/2 (whatever that is).
2019-06-22 23:25:27 -07:00
Theodore Dubois
71284af633 Implement a queue for pending signals 2019-06-22 22:58:06 -07:00
Theodore Dubois
a39027c499 Eliminate the need for a "queued" signal set 2019-06-22 22:01:48 -07:00
Theodore Dubois
ae689abff5 Require a siginfo when sending a signal 2019-06-22 20:48:49 -07:00
Theodore Dubois
82b872d687 Add missing prototype for create_piped_stdio 2019-06-02 16:25:14 -07:00
Theodore Dubois
873d2fe9ac
Merge pull request #398 from MatthewMerrill/pipes
If stdin is not a tty, inherit stdin/stdout/stderr.
2019-06-02 15:22:31 -07:00
Matthew Merrill
82721f373f tidy up stdio piping code and add error handling 2019-05-28 14:49:47 -07:00
Matthew Merrill
033e0de008 clean up unneccesary variable 2019-05-28 14:19:38 -07:00
Matthew Merrill
249790e720 if stdin is not a tty, inherit stdin/stdout/stderr 2019-05-28 14:17:32 -07:00
Theodore Dubois
e9a479842b Fallback to adhoc stdio for any error opening /dev/tty1 2019-05-26 19:24:21 -07:00
Theodore Dubois
6735d2d28e Undo attempted fix for race condition that caused deadlock 2019-05-26 12:24:23 -07:00
Theodore Dubois
f92703986d Delete existing SSE code 2019-05-19 17:14:39 -07:00
Matthew Merrill
47ea1e85de remove status argument from halt_system (#384) 2019-05-15 20:10:47 -07:00
Theodore Dubois
ed67d8b8ba VDSO related fixes for ptraceomatic 2019-05-12 09:11:59 -07:00
Theodore Dubois
80bd91a2ea Implement 32-bit statfs 2019-05-11 23:13:52 -07:00
Theodore Dubois
4c7973e0e3 Implement alarm(2) 2019-05-11 22:50:44 -07:00
Theodore Dubois
779bae1fce Reparent children to another thread in the group first 2019-05-11 22:27:38 -07:00
Theodore Dubois
e96882c07a Get rid of idiotic fork_task function that broke threads 2019-05-05 22:09:37 -07:00
Theodore Dubois
76698412b1 Stub membarrier 2019-05-05 19:51:08 -07:00
Theodore Dubois
7d030189d2 Zero out a tty's session when the session dies 2019-05-05 19:47:26 -07:00
Theodore Dubois
3b01daa41e Only acquire a controlling tty if the tty has no session 2019-05-05 16:31:07 -07:00
Theodore Dubois
cebd8758ec Add strace for chmod and chown 2019-05-05 13:17:09 -07:00
Theodore Dubois
7a45420ac0 Make the session automatically restart 2019-05-05 09:21:13 -07:00
Theodore Dubois
fd3308f2c6 fuck 2019-05-04 23:52:24 -07:00
Theodore Dubois
5adc2832a6 Correct references to RLIM_INFINITY_ 2019-05-04 23:48:59 -07:00
Theodore Dubois
894c3d2af5 Make the whole boot system thing happen 2019-05-04 23:32:24 -07:00
Theodore Dubois
cc08b17c48 Add flags option to mount 2019-05-01 18:12:58 -07:00
Theodore Dubois
a94a56cfb4 Rework implementation of rlimit calls
Turns out prlimit is the only call that takes a 64-bit rlimit struct.
The other ones are supposed to take a 32 bit struct, and I never noticed
any stack smashing until now because musl just uses prlimit.
2019-05-01 16:25:32 -07:00
Theodore Dubois
623be6edc1 Implement tgkill 2019-05-01 15:31:15 -07:00
Theodore Dubois
480fde90f7 Implement utimes 2019-05-01 14:41:08 -07:00
Theodore Dubois
9757444e8d Implement sendmmsg 2019-05-01 10:34:45 -07:00
Theodore Dubois
6904368c7d Store the robust list 2019-05-01 09:45:20 -07:00
Theodore Dubois
54c236f375 Stub arch_prctl 2019-05-01 09:45:10 -07:00
Theodore Dubois
d405f1abcf Don't crash when given an out of bounds syscall 2019-05-01 09:44:43 -07:00
Theodore Dubois
cef1841a40 Make it possible to run init
If you set the init command to /sbin/init, you'll see it fail to run openrc and then start a working getty.
2019-05-01 08:53:25 -07:00
Theodore Dubois
8d533146c5 Implement getdents 2019-05-01 08:50:41 -07:00
Theodore Dubois
9f4dd9204c Zero out registers in exec 2019-04-27 16:48:45 -07:00
Theodore Dubois
6d2f84c0af Fix build on linux 2019-04-21 12:23:56 -07:00
Theodore Dubois
f5360288f3 Implement 32-bit variant of getrlimit 2019-04-21 12:17:38 -07:00
Theodore Dubois
6ec8ec9db5 Rename fd data structs 2019-04-14 17:49:42 -07:00
Theodore Dubois
8b7bde4e9a Make stdio connect to a real file, /dev/tty1 by default
I expect we'll eventually have more than 1.
2019-04-07 22:27:18 -07:00
Theodore Dubois
8c13e11c7e Implement SIGTTIN 2019-04-07 21:30:55 -07:00
Theodore Dubois
dc490b961b Stub reboot(2) 2019-04-07 19:28:08 -07:00
Theodore Dubois
9be954bc87 Unbreak fstat on deleted files 2019-03-30 20:07:53 -07:00
Theodore Dubois
22b2b200d3 Stub PRCTL_SET_KEEPCAPS 2019-03-24 18:17:09 -07:00
Theodore Dubois
3a8795907e Implement pause(2) 2019-03-24 18:16:56 -07:00
Theodore Dubois
ff1df4a53f Allow getpgid with your own pid 2019-03-24 18:16:42 -07:00