Saagar Jha
1d16949fae
Implement ptrace
2020-10-11 19:36:01 -07:00
Saagar Jha
a9d70a1677
construct_task returns a pointer, not an integer
2020-10-11 12:21:37 -07:00
Theodore Dubois
93ab1bbfaa
Don't crash if the root can't be opened
...
#808
2020-07-06 16:29:58 -07:00
Theodore Dubois
33ea7c8327
Make iosfs unsafe into a mount option
2020-04-12 17:07:47 -07:00
Theodore Dubois
a3e0e9f104
Move realfs functions to fs/real.h
2020-04-12 13:18:41 -07:00
Theodore Dubois
51102d7cab
Reset signal mask when creating a new init child
2019-11-02 16:31:50 -07:00
Theodore Dubois
6c906ac5b4
Make the iOS terminal look like a pty
...
Also make the terminal and session owned by TerminalViewController.
This is in preparation for scene support.
Co-authored-by: Noah Peeters <noah.peeters@icloud.com>
2019-10-27 19:29:03 -07:00
Viktor Oreshkin
c11d375e94
Add devices.h, replace magic dev numbers with defines
2019-08-06 16:48:00 +03: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
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
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
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
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
088e7b727d
Implement ptys
...
Also a bunch of somewhat related changes, I was too lazy to break this into more than one commit
2019-01-21 12:20:43 -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
f8028736b4
Make mounting filesystems possible
2018-12-22 19:38:41 -08:00
Theodore Dubois
b96b4f4d40
Mark stdio as open for reading and writing
2018-12-07 17:30:16 -08:00
Theodore Dubois
394879521b
Set the soft open file limit to something sane
2018-11-16 16:31:13 -08:00
Theodore Dubois
6a035e9186
Fix "function declaration is not a prototype" warnings
2018-11-14 17:13:22 -08:00
Theodore Dubois
58a3b91f24
*Actually* establish SIGUSR1 handler with sigaction
2018-11-11 17:11:15 -08:00
Theodore Dubois
c768e68b10
Establish SIGUSR1 handler with sigaction so calls won’t restart
2018-11-11 17:01:39 -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
e170446cc4
Store the adhoc stat info in the fd
2018-10-08 11:43:54 -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
601ed99dc3
Make sure different processes have different pids
2018-06-17 15:15:42 -07:00
Theodore Dubois
85e68739fd
Stop creating extra fs_info
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
a5fb79920c
Split signal handlers into a separate structure and clone flag
2018-01-21 20:52: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
bf3b711cdd
Implement tracking of process cpu usage
2018-01-10 15:33:11 -08:00
Theodore Dubois
8b47bee6a9
Add calls to get and set resource limits
2018-01-10 14:47:38 -08:00
Theodore Dubois
77afbe3aa3
Replace err_map(errno) with errno_map, and fix EPIPE handling
2017-12-15 15:55:53 -08:00
Theodore Dubois
37aef44173
Stop mutating the path in real fs functions
2017-11-15 17:44:11 -08:00
Theodore Dubois
6e85bf4ffb
Set the current directory correctly when there's no root
2017-11-14 16:46:27 -08:00
Theodore Dubois
cd370cd0cb
Get alpine filesystem into iOS app
2017-10-30 17:16:56 -07:00
Theodore Dubois
63a9ff018e
Replace extended attributes with an NDBM-API-compatible database
2017-10-28 18:52:26 -07:00
Theodore Dubois
afb6b5d5c6
Exit handling on iOS
2017-10-25 15:52:09 -07:00