52 Commits

Author SHA1 Message Date
tbodt
75f77fe1a6
Inline the important contents of twitter links 2024-10-19 20:21:17 -07:00
Theodore Dubois
c99cb7b01b Implement SIGEV_THREAD_ID 2023-05-02 21:55:49 -07:00
Theodore Dubois
9bc2afb30e Refactor for linux 2020-12-20 16:35:22 -08:00
Theodore Dubois
c40dff7d15 Fix race between execve and procfs
task->mm may be released and replaced by execve while another thread
uses it to read memory using procfs.

Fixes #1102
2020-12-18 14:56:24 -08:00
Saagar Jha
5c223f552f Fix warnings 2020-11-11 00:27:44 -08:00
Saagar Jha
1d16949fae Implement ptrace 2020-10-11 19:36:01 -07:00
Saagar Jha
bf1603ef2b Put the task pid in the thread name 2020-10-11 12:21:37 -07:00
Theodore Dubois
640017278e Fix locking issues with CPU refactor
There was a deadlock when cpu_run called cpu_step_to_interrupt with mem
read-locked, and it would write-lock mem to clean up jetsam.
2020-06-09 00:35:53 -07:00
Theodore Dubois
e3c1346586 Squash some GCC warnings that only appear when compiling with optimization 2020-05-30 21:43:15 -07:00
Theodore Dubois
3795b289a5 Implement timer_create and timer_settime
Fixes #707
2020-05-10 12:12:47 -07:00
Theodore Dubois
3f0e51f10f Fix race on group->threads 2019-09-08 22:48:16 -07:00
Theodore Dubois
d5f930996a Implement sigtimedwait 2019-08-25 21:28:31 -07:00
Theodore Dubois
7123f95eb5 Even more correctly handle signals sent during a sigsuspend() 2019-08-11 14:36:45 -07:00
Theodore Dubois
62e7f022cf Increase the PID limit to something more realistic 2019-07-07 22:19:01 -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
779bae1fce Reparent children to another thread in the group first 2019-05-11 22:27:38 -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
7a45420ac0 Make the session automatically restart 2019-05-05 09:21:13 -07:00
Theodore Dubois
894c3d2af5 Make the whole boot system thing happen 2019-05-04 23:32:24 -07:00
Theodore Dubois
6904368c7d Store the robust list 2019-05-01 09:45:20 -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
2f8c0afcbf Add sockrestart infrastructure 2019-01-26 17:39:22 -08:00
Theodore Dubois
1265ff32c3 Fix zsh sometimes hanging in sigsuspend 2019-01-06 11:09:26 -08:00
Theodore Dubois
89d5b7f69a Resolve -Wsign-compare 2019-01-05 18:11:16 -08:00
Theodore Dubois
5cfec48854 Separate out some components of struct mem into struct mm 2019-01-04 15:17:37 -08:00
Theodore Dubois
8478bf5b53 Implement stopping processes with signals 2019-01-01 12:54:26 -08:00
Theodore Dubois
09d3885c70 Remove useless has_timer field 2018-12-31 18:03:29 -08:00
Theodore Dubois
610e9a8295 Refactor exit management code 2018-12-31 18:03:20 -08:00
Theodore Dubois
14d30a35df Fix potential UAF when handling CLONE_VFORK 2018-12-31 17:29:36 -08:00
Theodore Dubois
3b7c92d141 Implement sigsuspend
Fixes zsh (#103)
2018-12-30 21:19:46 -08:00
Theodore Dubois
377aa9056e Save the name of the program in the task struct 2018-12-24 23:12:19 -08:00
Theodore Dubois
aa47e74092 Use the exit signal passed to clone() 2018-12-20 19:19:56 -08:00
Theodore Dubois
a9bd656d2b Implement mknod in fake/real fs 2018-12-07 11:58:51 -08:00
Theodore Dubois
2adc56625c Make process group and session membership per-thread-group 2018-12-06 14:17:46 -08:00
Theodore Dubois
520108b519 Implement getgroups and setgroups 2018-12-01 17:22:41 -08:00
Theodore Dubois
7d0e083098 Don't freeze the main thread when tapping the screen 2018-11-30 12:32:51 -08:00
Theodore Dubois
3bd6682d70 Implement setuid, setgid and better checks for setresuid 2018-11-24 20:37:58 -08:00
Theodore Dubois
9a3a89252d Fully implement setpgid 2018-11-11 14:40:05 -08:00
Theodore Dubois
7a91160b30 Try a completely different implementation of interrupting waits 2018-11-09 13:56:08 -08:00
Theodore Dubois
12ed53a493 Introduce a replacement for pthread conditions and use that to make exit_group work 2018-11-08 18:57:06 -08:00
Theodore Dubois
f616b55ccc Implement basic setresuid and setresgid 2018-10-07 19:07:52 -07:00
Theodore Dubois
4a8efe8d01 Make various memory management things shared between threads 2018-10-07 13:02:15 -07:00
Theodore Dubois
62a699603b Add half-finished files app integration 2018-09-22 15:18:45 -07:00
Theodore Dubois
76124c1933 First pass at implementing exit_group 2018-02-01 17:23:00 -08:00
Theodore Dubois
7e5e9e5c1f First pass at implementing thread groups
It builds and will give you a shell. Gonna call it a day.
2018-01-28 15:42:42 -08:00
Theodore Dubois
c776bb8e2a Clarify locking on task struct 2018-01-26 16:48:49 -08:00
Theodore Dubois
628055c2ba Use more specific types for several fields in task struct 2018-01-26 16:41:29 -08:00
Theodore Dubois
b07a0f6de8 Implement CLONE_CHILD_CLEARTID 2018-01-22 13:48:24 -08:00
Theodore Dubois
a5fb79920c Split signal handlers into a separate structure and clone flag 2018-01-21 20:52:16 -08:00