Commit Graph

1466 Commits

Author SHA1 Message Date
Agoston Szepessy b5f767ea30 More PR feedback
Use u8 internally instead of `c_char`.
2024-07-23 18:07:09 +02:00
Agoston Szepessy 99ade44c12 PR feedback
- Remove `stdio` functions and use `File` API completely.
- Remove `unsafe` from wrapper function.
- Move static buffer to `getpass()` instead of keeping it in wrapper.
2024-07-23 16:56:39 +02:00
Agoston Szepessy 545e9e7b29 Implement getpass using File API
Returns a Result for better error handling.
2024-07-23 16:07:25 +02:00
Agoston Szepessy a83d4cbced Implement getpass()
Also make fields in `termios` public; required for modifying them.

There's an new type of test: `EXPECT_INPUT_BINS`. These require a `.exp`
file to be present along with the `.c` file. The `.exp` file takes the
produced binary as an argument and sends input to the program. This is
useful for testing functions like `getpass()`.
2024-07-23 16:07:25 +02:00
4lDO2 44ec1676ae Activate new threads' TCBs early. 2024-07-18 23:59:48 +02:00
4lDO2 d458b6cdcd Handle waitpid WUNTRACED stop signals properly. 2024-07-18 23:59:48 +02:00
4lDO2 ac5ac928f2 Implement raise() using pthread_kill. 2024-07-18 23:59:48 +02:00
4lDO2 15cdc4e0aa Fix (modified) audiod. 2024-07-18 23:59:47 +02:00
4lDO2 4cb6644181 Implement exit_this_thread on Redox. 2024-07-18 23:59:47 +02:00
4lDO2 c286dd6d33 Use new-thread proc API 2024-07-18 23:59:47 +02:00
4lDO2 bf26de70e2 Add setresuid/setresgid (suid/sgid stub on Redox). 2024-07-18 23:54:46 +02:00
Jeremy Soller 312b66e547 Merge branch 'usignal2' into 'master'
Implement syscall restart

See merge request redox-os/relibc!483
2024-07-17 09:38:41 +00:00
4lDO2 17cb748217 Implement syscall restart for waitpid. 2024-07-16 12:48:14 +02:00
4lDO2 4c20a9abb2 Enable syscall restart in futex_wait. 2024-07-16 11:55:06 +02:00
Peter Limkilde Svendsen dbcf8049fc Refactor rand48 functions with less unsafe 2024-07-15 17:44:56 +00:00
4lDO2 284f51b47e Fix struct sigaction defintion. 2024-07-09 15:39:57 +02:00
4lDO2 b64b0ebe18 Handle kill and killpg EINTR. 2024-07-09 15:00:58 +02:00
4lDO2 78247c8525 Pass signal correctly to SYS_KILL. 2024-07-09 15:00:58 +02:00
4lDO2 8298417dee Implement sigpending on Redox. 2024-07-09 15:00:58 +02:00
4lDO2 c639fd37ba Implement sigaltstack. 2024-07-09 15:00:57 +02:00
4lDO2 5460ffc4c9 Jump to trampoline after SYS_{READ,WRITE} EINTR. 2024-07-09 15:00:57 +02:00
4lDO2 63509e75ce Use new signal ABI where 'actions' are in shmem. 2024-07-09 15:00:56 +02:00
4lDO2 2d66993b3f Adapt to now-inverted signal mask (allowset). 2024-07-09 15:00:55 +02:00
4lDO2 18b5c73b61 Compile on the other arches. 2024-07-09 15:00:55 +02:00
4lDO2 f37bb3cb16 Fix sigaction test on Linux, and rustfmt. 2024-07-09 15:00:55 +02:00
4lDO2 0ea2b5d45f Fix compilation on Linux. 2024-07-09 15:00:55 +02:00
4lDO2 a1e1a159ae Initialize altstack properly. 2024-07-09 15:00:54 +02:00
4lDO2 a265c8b7a0 Reimplement libredox sig{procmask,action}. 2024-07-09 15:00:54 +02:00
4lDO2 b6eb7dcf0f Impl From<Errno> for syscall::Error. 2024-07-09 15:00:54 +02:00
4lDO2 c217745524 Mark sig{add,del}set unsafe, rather than unsound. 2024-07-09 15:00:54 +02:00
4lDO2 42c24dd755 Successfully run more userspace. 2024-07-09 15:00:53 +02:00
4lDO2 a2ab86d253 Implement signal selection in asm, for SA_ONSTACK. 2024-07-09 15:00:53 +02:00
4lDO2 4e93f68324 Implement hack to ensure TCB exists in bootstrap. 2024-07-09 15:00:53 +02:00
4lDO2 58d1153536 Split part of TCB into generic-rt 2024-07-09 15:00:53 +02:00
4lDO2 edfe46c60b Write x86-64 signal trampoline asm stub. 2024-07-09 15:00:52 +02:00
4lDO2 5177ca3926 Remove memoffset dependency. 2024-07-09 15:00:52 +02:00
4lDO2 7d562920c2 Add sigaction boilerplate. 2024-07-09 15:00:52 +02:00
4lDO2 e1d3bf475a Increase SIGRTMIN to 35. 2024-07-09 15:00:52 +02:00
4lDO2 53ed7aae59 Move rlct_clone, sigprocmask, sigaction, to rt. 2024-07-09 15:00:52 +02:00
4lDO2 4eb20628f3 Move some of signal config to redox-rt. 2024-07-09 15:00:52 +02:00
4lDO2 a800693266 Refactor: move redox-exec into redox-rt::proc. 2024-07-09 15:00:52 +02:00
Derick Eddington 572f211be0 Fix getgrgid_r. 2024-07-06 22:47:55 -07:00
Derick Eddington 7c81de68b8 Fix header::grp::parse_grp. 2024-07-06 22:47:55 -07:00
Derick Eddington 802748b611 Fix Rwlock::acquire_write_lock to avoid blocking indefinitely.
Without this fix, `tests/bins_static/pthread/rwlock_randtest` would sometimes get stuck blocking
forever with only 1+ threads all doing `pthread_rwlock_wrlock()` but all the other threads
having finished.
2024-07-06 22:47:55 -07:00
4lDO2 4c11b607de Implement pread and pwrite using the syscalls. 2024-06-14 14:10:47 +02:00
4lDO2 6e86e64fdf Move pthread into TCB. 2024-06-08 11:36:22 +02:00
4lDO2 326c8a6231 Split shared ld_so code and actual ld_so stubs. 2024-06-08 11:36:06 +02:00
Jeremy Soller 73952b69ed Update to new nightly 2024-05-11 14:00:59 -06:00
Jeremy Soller b7a4527ab8 Do not print on unsupported epoll flags 2024-05-06 15:24:56 -06:00
Jeremy Soller 8ab61e3d9a Convert syscall events to EPOLL events 2024-05-06 15:16:31 -06:00