61 Commits

Author SHA1 Message Date
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
7a45420ac0 Make the session automatically restart 2019-05-05 09:21:13 -07:00
Theodore Dubois
c2aedb4773
Merge pull request #342 from saagarjha/master
Use list_for_each_entry_safe when reparenting children
2019-03-09 21:27:50 -08:00
Saagar Jha
a492a69ecc Use list_for_each_entry_safe when reparenting children 2019-03-09 21:21:13 -08:00
Theodore Dubois
b9e753dc15 Fix a bizzare typo 2019-03-09 21:05:44 -08:00
Theodore Dubois
3ce1aef431 Fix UAF when exiting a process that was reparented 2019-02-19 06:50:09 -08:00
Theodore Dubois
93bc13d924 Fix tsan warnings 2019-02-04 18:53:42 -08:00
Theodore Dubois
7e4c9d45cb Return 0 from wait with WNOHANG if child exists 2019-02-01 10:39:51 -08:00
Theodore Dubois
34c377c87d Improve controlling tty reference counting 2019-01-31 17:57:12 -08:00
Theodore Dubois
e5ca15aeb2 Make SIGKILL work on a stopped process 2019-01-08 09:24:46 -05:00
Theodore Dubois
842da480bf Correctly handle spurious wakeups in wait4 2019-01-07 11:40:49 -08:00
Theodore Dubois
c14eca8ae7 Fix a couple of segfaults in midnight commander 2019-01-06 17:13:34 -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
6a0f7253db Fix locking on children_rusage in reap_if_zombie 2019-01-01 12:31:42 -08:00
Theodore Dubois
1e3319c242 Don't return ECHILD from waitpid(-1) if there are children 2018-12-31 19:38:00 -08:00
Theodore Dubois
610e9a8295 Refactor exit management code 2018-12-31 18:03:20 -08:00
Theodore Dubois
6dca791a13 Fix memory leak of timers 2018-12-31 17:30:10 -08:00
Theodore Dubois
eb87fe2a64 Make sure the strace output from exit actually appears 2018-12-30 21:19:03 -08:00
Theodore Dubois
4af803d3db Reparent children before destroying the task 2018-12-26 17:30:11 -08:00
Theodore Dubois
2e83bbe9fb Fix some lock ordering issues 2018-12-26 12:11:07 -08:00
Theodore Dubois
f8028736b4 Make mounting filesystems possible 2018-12-22 19:38:41 -08:00
Theodore Dubois
b55de4d7d2 Improve the situation with waiting for threads 2018-12-20 19:20:19 -08:00
Theodore Dubois
aa47e74092 Use the exit signal passed to clone() 2018-12-20 19:19:56 -08:00
Theodore Dubois
952221fe0d Allow waiting on children of a different thread 2018-12-19 15:15:15 -08:00
Theodore Dubois
c8468470b6 Return ECHILD from waitpid(-1) with no children
Fixes #204
2018-12-19 14:20:58 -08:00
Theodore Dubois
2297838700 Send SIGCHLD to parent of dead process 2018-12-19 13:39:45 -08:00
Theodore Dubois
f0767992f3 Implement reparenting 2018-12-07 18:46:01 -08:00
Theodore Dubois
2adc56625c Make process group and session membership per-thread-group 2018-12-06 14:17:46 -08:00
Ryan Hileman
277dd12e49 implement futex timeouts 2018-11-14 12:13:35 -08:00
Theodore Dubois
3303edd723 Delete the process timer on exit 2018-11-14 02:54:28 +00:00
Theodore Dubois
3d52f2d01a Make new condition implementation work on Darwin 2018-11-08 19:28:11 -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
4a8efe8d01 Make various memory management things shared between threads 2018-10-07 13:02:15 -07:00
Theodore Dubois
310a77ab3a Implement CLONE_CHILD_CLEARTID 2018-10-05 16:42:16 -07:00
Theodore Dubois
cb1c658598 Fix some incorrect locking 2018-10-01 14:48:27 -07:00
Theodore Dubois
fd7d640abd Fix a bunch of issues reported by static analyzers 2018-10-01 11:02:10 -07:00
Theodore Dubois
46f65f724b Add some clarifying comments to exit.c 2018-08-29 02:18:56 +00:00
Theodore Dubois
34c0d4b6a1 Don't segfault if exit_hook returns 2018-04-18 11:13:08 -07:00
Theodore Dubois
d1a8dff6a8 Add a couple of straces 2018-03-28 15:37:28 -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
b07a0f6de8 Implement CLONE_CHILD_CLEARTID 2018-01-22 13:48:24 -08:00
Theodore Dubois
bb6b0dd344 Release fs_info and sighand in exit 2018-01-22 13:05:16 -08:00
Theodore Dubois
eddf023669 Move pwd, root, uname out into its own struct 2018-01-21 17:24:32 -08:00
Theodore Dubois
6a907425e6 Rename process to task 2018-01-21 12:44:55 -08:00
Theodore Dubois
728ca235c0 Replace files array with fdtable structure 2018-01-15 19:18:38 -08:00
Theodore Dubois
77f9c73be9 Remove magic from locking macros 2018-01-14 18:18:12 -08:00
Theodore Dubois
bf3b711cdd Implement tracking of process cpu usage 2018-01-10 15:33:11 -08:00