summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/unistd.cpp
AgeCommit message (Collapse)Author
2021-04-30Kernel/LibC: Implement `setreuid`Jesse Buhagiar
2021-04-24Utilities: Add pathchkBrendan Coles
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-04-21LibC: Add pwrite(..) implementation to match the existing pread(..)Brian Gianforcaro
Add a basic non-thread safe implementation of pwrite, following the existing pread(..) design. This is needed for https://fio.readthedocs.io
2021-04-19LibC: Improve error logging for execvp()Gunnar Beutner
2021-04-14LibC: Change return type for sleep() to unsigned intGunnar Beutner
According to POSIX.1-2001 the return type should be unsigned int.
2021-03-28LibC: Add vfork() as a simple wrapper around fork()Andreas Kling
I don't know if we should implement optimized vfork(). I'm adding it here since SDL2 uses it.
2021-03-17LibC+Kernel: Switch off_t to 64 bitsJean-Baptiste Boric
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-17LibC: Convert dbgprintf() => dbgln()Andreas Kling
2021-02-15LibC+LibPthread: Implement pthread_atfork()AnotherTest
This required a bit of rearchitecture, as pthread_atfork() required a mutex, and duplicating a mutex impl for it was silly. As such, this patch moves some standalone bits of pthread into LibC and uses those to implement atfork(). It should be noted that for programs that don't use atfork(), this mechanism only costs two atomic loads (as opposed to the normal mutex lock+unlock) :^)
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-30LibC: Convert remaining String::format() to formatted()/number()Andreas Kling
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-16Kernel+LibC: Make sys$getcwd truncate the result silentlyBen Wiederhake
This gives us the superpower of knowing the ideal buffer length if it fails. See also https://github.com/SerenityOS/serenity/discussions/4357
2021-01-16LibC: Fix memory leak in getcwdBen Wiederhake
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling