summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/signal.cpp
AgeCommit message (Collapse)Author
2022-07-22LibC: Mark a bunch of functions as cancellation pointsTim Schumacher
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-07-08Kernel: Implement `sigsuspend` using a SignalBlockerTim Schumacher
`sigsuspend` was previously implemented using a poll on an empty set of file descriptors. However, this broke quite a few assumptions in `SelectBlocker`, as it verifies at least one file descriptor to be ready after waking up and as it relies on being notified by the file descriptor. A bare-bones `sigsuspend` may also be implemented by relying on any of the `sigwait` functions, but as `sigsuspend` features several (currently unimplemented) restrictions on how returns work, it is a syscall on its own.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2021-12-21LibC: Add POSIX spec comments for signal APIsBrian Gianforcaro
2021-12-12LibC: Implement sigwait()Idan Horowitz
This is done internally by just calling the more modern sigtimedwait syscall and then massaging the results to fit sigwait's interface.
2021-12-12LibC: Implement sigwaitinfo()Idan Horowitz
This is implemented as a simple wrapper around sigtimedwait()
2021-12-12Kernel+LibC: Implement sigtimedwait()Idan Horowitz
This includes a new Thread::Blocker called SignalBlocker which blocks until a signal of a matching type is pending. The current Blocker implementation in the Kernel is very complicated, but cleaning it up is a different yak for a different day.
2021-12-01Kernel+LibC: Implement sigaltstack()Idan Horowitz
This is required for compiling wine for serenity
2021-08-22LibC: Support getsignalbyname() with full signal nameMaciej Zygmanowski
This allows e.g. to use `kill` with names like -SIGKILL, not only -KILL.
2021-08-18LibC: Fix sigsetjmp and siglongjmpJean-Baptiste Boric
2021-08-18LibC: Expose sig_sysname arrayJean-Baptiste Boric
2021-08-13LibC: Implement sigsuspend functionJean-Baptiste Boric
2021-06-09LibC: Add stub implementation for sigsuspendThiago Henrique Hupner
Currently, ZSH tries to call this function and it always asserts, so adding a stub to allow ZSH at least open.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-05Userland: Add LibSystem and funnel all syscalls through itAndreas Kling
This achieves two things: - Programs can now intentionally perform arbitrary syscalls by calling syscall(). This allows us to work on things like syscall fuzzing. - It restricts the ability of userspace to make syscalls to a single 4KB page of code. In order to call the kernel directly, an attacker must now locate this page and call through it.
2021-01-17LibC: Change a couple of ASSERT_NOT_REACHED() to TODO()Linus Groh
Just for semantic correctness and better visibility of those unimplemented stub functions.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling