summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2020-12-16ln: Make the 'path' argument optionalAndreas Kling
If 'path' is omitted, we create a link with the basename of whatever the target is. This matches what other systems do.
2020-12-16Userland: Add beep utilityBrendan Coles
2020-12-14Loader: Don't re-load self-dependant librariesItamar
2020-12-14UserspaceEmulator: Support dynamically loaded programsItamar
When loading dynamic objects, the emulator loads the interpreter, generates an auxiliary vector and starts executing the loader. Additionally, this commits also makes the MallocTracer and backtrace symbolication work for dynamically loaded programs.
2020-12-14Loader: Take main program name from auxiliary vectorItamar
2020-12-14Loader: Stabilize loader & Use shared libraries everywhere :^)Itamar
The dynamic loader is now stable enough to be used everywhere in the system - so this commit does just that. No More .a Files, Long Live .so's!
2020-12-14Loader: Add dynamic loader programItamar
The dynamic loader exists as /usr/lib/Loader.so and is loaded by the kernel when ET_DYN programs are executed. The dynamic loader is responsible for loading the dependencies of the main program, allocating TLS storage, preparing all loaded objects for execution and finally jumping to the entry of the main program.
2020-12-14jp: Remove trailing comma at end of object/array to make output valid JSONLinus Groh
It's ironic that `jp` currently refuses to parse its own output :^)
2020-12-14jp: Only output colors when stdout is a TTYLinus Groh
2020-12-14jp: Use new format functionsLinus Groh
2020-12-13LibWeb: Make HTMLDocumentParser take an existing documentAndreas Kling
We shouldn't really be creating the document objects inside the parser, since that makes it hard to hook up e.g JavaScript bindings early on.
2020-12-13LibCore: Make IODevice::read_line() return a StringAndreas Kling
Almost everyone using this API actually wanted String instead of a ByteBuffer anyway, and there were a bunch of slightly different ways clients would convert to String. Let's just cut out all the confusion and make it return String. :^)
2020-12-12LibPthread: Return errors as positive return valuesTom
pthread implementations generally return errors as a positive non-zero value. Our kernel generally returns errors as negative values. If we receive a negative value from a system call, turn it into a positive return value to relay the error appropriately. Also, fix the tt test utility to not rely on errno, as the pthread library does not use errno.
2020-12-09Userland: Fix overly-eager loop detection in cp (#4368)Sahan Fernando
The bug is that if you try to cp DIR_A to DIR_B where DIR_A and DIR_B have the same parent directory and DIR_A's name is a prefix of DIR_B (e.g. foo -> foo2, bar -> barbar), it thinks that it's a subdirectory (since it checks if DIR_A's realpath is a prefix of DIR_B's realpath). The easiest solution is to put a path delimiter at the end before the comparison, since you can't have a / in the middle of a directory name. For example if DIR_A is /home/anon/foo and DIR_B is /home/anon/foo2, then DIR_A's realpath is a prefix of DIR_B's realpath even though DIR_B is not inside DIR_A.
2020-12-09Userland: Fix segfault in sortSahan Fernando
2020-12-06Userland: Fix typo in 'pro' helpBen Wiederhake
2020-12-06Userland: Write some '--help' descriptions where appropriateBen Wiederhake
2020-12-05js: Improve pretty-printing of various objectsLinus Groh
For many object types we only ever used the regular print_object() in the js REPL - resulting in a useless "{ }". This patch adds more individual representations for the following types: - Boolean/Number/String object: print wrapped value - ArrayBuffer: print byteLength and hex-formatted bytes in chunks of 16 - TypedArray: print length, byteLength, buffer pointer and values - Proxy: print target and handler Also improve the existing pretty-printing output: - More consistency, most objects now follow the format "[Type] ..." - Some coloring tweaks - No two spaces in empty arrays & objects Possible future improvements: - Add line breaks between elements of long arrays & objects Closes #4310.
2020-12-03test-js: Use new format functionsLinus Groh
2020-12-03test-js: Set test root correctly when specified as positional argLinus Groh
When a test root path was given to test-js it was never used, causing test-js to always fail.
2020-12-02Applications+Userland: Switch to new Audio::Loader APIJulian Offenhäuser
2020-11-30Kernel: Move block condition evaluation out of the SchedulerTom
This makes the Scheduler a lot leaner by not having to evaluate block conditions every time it is invoked. Instead evaluate them as the states change, and unblock threads at that point. This also implements some more waitid/waitpid/wait features and behavior. For example, WUNTRACED and WNOWAIT are now supported. And wait will now not return EINTR when SIGCHLD is delivered at the same time.
2020-11-29Userland: Implement -I/-a (binary-mode) and -i (insensitive) for grepAnotherTest
This fixes #4195 and closes #4196.
2020-11-29LibCore: Do not try to null-terminate a ByteBuffer in read_line()AnotherTest
That's just silly :) Also fix that one use of read_line() which assumes it will null-terminated in mount.cpp (this would've blown up if the IODevice was at EOF and had a line with the same size as max_size).
2020-11-29Tests/Kernel: Remove redundant `if` (#4111)Lenny Maiorani
Problem: - If `fork()` fails the system tries to call `execl()`. That will either succeed and replace the running process image or it will fail and it needs to try again. The `if` is redundant because it will only be evaluated if `execl()` fails. Solution: - Remove the `if`.
2020-11-29Userland: Make `mv` capable of moving multiple filesAnotherTest
Closes #4188.
2020-11-28Userland: Implement find -name clauseSergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/4191
2020-11-28Tests: Add Kernel tests for unveil system call browse 'b' flagBrendan Coles
2020-11-27LibJS+js: Rename RegExp.{content => pattern}AnotherTest
The spec talks about it as 'pattern', so let's use that instead.
2020-11-27Userland: Add support for 'match' in 'expr'AnotherTest
2020-11-27Userland: Add grep utilityEmanuel Sprung
Grep supports only extended regular expressions, and is able to handle one pattern handed over via -e or directly after the options. Also, multiple files can be handed over. Recursive mode is outstanding, but no real magic :^)
2020-11-26LibPthread: Fix broken EINVAL check in pthread_attr_setdetachstate()Andreas Kling
Also fix up some misleading error messages in the 'tt' test program.
2020-11-26test-js: Don't keep a pointer to a temporary String's charactersAndreas Kling
This was only an issue in the Lagom build.
2020-11-24Userland: Add a test for pthread_once()Sergey Bugaev
2020-11-22base64: Fix not outputting all decoded dataBenJilks
It would use printf to output the data, so if it contains a null terminator it'll stop.
2020-11-20test-crypto: Remove foo.response file created by testing (#4110)Lenny Maiorani
Problem: - Test creates a file and leaves it in the source tree. Solution: - Remove the creation of the file since it is never checked.
2020-11-17Userland: Add -v verbose flag to 'rm'Spencer Dixon
2020-11-17Userland: Add -v verbose flag to 'mv'Spencer Dixon
2020-11-17Userland: Add -v verbose flag to 'cp'Spencer Dixon
2020-11-15Everywhere: Add missing <AK/ByteBuffer.h> includesAndreas Kling
All of these files were getting ByteBuffer.h from someone else and then using it. Let's include it explicitly.
2020-11-15Userland: Tests: Use mkstemp temporary files in testsBrendan Coles
2020-11-14Userland: chroot: Add `--userspec`/`-u` flag to set uid/gid for chrootBrendan Coles
2020-11-14LibCrypto: Implement GCM modeAnotherTest
2020-11-14test-crypto: Silence the "creating bytebuffer..." debugAnotherTest
2020-11-14Userland: Add test-gfx-font for Gfx::Font testsBrendan Coles
2020-11-12Lagom: Add ntpquery to lagom buildNico Weber
2020-11-12Userland: env: Add `-i` / `--ignore-environment` arg to clear envBrendan Coles
2020-11-12test-js: Add canParseSource() native functionLinus Groh
This allows us to check code for syntax errors without relying on Function(), which can lead to false negatives as certain things are valid in a function context, but not outside one.
2020-11-11Userland: Add test for file SUID+SGID bits stripped when modifiedBrendan Coles
2020-11-11ls: Only append file type indicators when -F or --classify is specifiedAndreas Kling