Age | Commit message (Collapse) | Author |
|
We have a hierarchical filesystem, let's make use of it :^)
|
|
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp
is unwritable.
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
Lagom now builds under macOS. Only two minor adjustments were required:
* LibCore TCP/UDP code can't use `SOCK_{NONBLOCK,CLOEXEC}` on macOS,
use ioctl() and fcntl() instead
* LibJS `Heap` code pthread usage ported to MacOS
|
|
The "ready to write" notifier we set up in generic socket connection is
really only meant to detect a successful connection. Once we have a TCP
connection, for example, it will fire on every event loop iteration.
This was causing IRC Client to max out the CPU by getting this no-op
notifier callback over and over.
Since this was only used by TLSv12, I changed that code to create its
own notifier instead. It might be possible to improve TLS performance
by only processing writes when actually needed, but I didn't look very
closely at that for this patch. :^)
|
|
This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
|
|
This way, a program can use ArgsParser multiple times, potentially with
multiple different options.
|
|
This fixes an issue where continuously posting new events to the queue
would keep the event loop saturated, causing it to ignore notifiers.
Since notifiers are part of the big select(), we always have to call
wait_for_events() even if there are pending events. We're already smart
enough to select() without a timeout if we already have pending events.
|
|
The previous code did not account for the case when there are timers present,
but none are enabled, and used a zero polling timeout.
Fixes https://github.com/SerenityOS/serenity/issues/2222
|
|
This also makes LibHTTP's Job::can_read_line() const, as IODevice was
keeping that from being const.
Fixes #2219
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
Moves DirectoryServices out of LibCore (because we need to link with
LibIPC), renames it Desktop::Launcher (because Desktop::DesktopServices
doesn't scan right) and ports it to use the LaunchServer which is now
responsible for starting programs for a file.
|
|
|
|
This should go away when we get the ability to parse strings to
DateTime's.
|
|
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
|
|
|
|
Also updates `pro` to display download progress and speed on stderr
|
|
|
|
|
|
Clang complains about this; with the change the next commit is going
to make to ASSERT() internals, GCC is going to start to complain as well.
|
|
Fixes #1854.
|
|
Prior to this commit, we would (re-)allocate the output buffer aligned
to 1024 bytes, but never trim it down to size, which caused
Gzip::decompress to return uninitialised data.
|
|
|
|
`read_bool_entry()` can now interpret both integers (1 or 0) and
Boolean strings ("true" or "false") in configuration files.
All values other than "1" or "true" are considered false.
|
|
|
|
It was impractical to return a RefPtr<File> since that left us no way
to extract the error string. This is usually needed for the UI, so the
old static open() got basically no use.
|
|
Fixes #1853.
|
|
For those good boy points :^)
|
|
|
|
This is just a convenience function for creating single-shot timers.
|
|
|
|
Prior to this, UDPServer was using listen/accept, which does not make
sense in the context of UDP.
|
|
The event that triggered the exit from an inner event loop would always
get re-delivered in the outer event loop due to a silly off-by-one
mistake when transferring pending events between loops.
|
|
This helper opens a file with a given name, mode and permissions and
returns it in a RefPtr<File>. I think this will be a bit nicer to use
than having to go through Core::File::construct() every time.
|
|
|
|
We can also remove an outdated FIXME as dbg() does now support unsigned
longs :^)
|
|
|
|
|
|
The kernel was already using the UDP prefix, and the TCP LibCore classes
are also uppercased. Let's rename for consistency.
Also order the LibCore Makefile alphabetically, because everywhere else
seems to be doing that :)
|
|
The ID allocator is destroyed before a timer in HackStudio is
is unregistered leading to an access violation.
Fixes #1382.
|
|
|
|
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
|
|
|
|
LibCore's GZip is also moved into the Core namespace with this change.
|
|
|
|
Add a SetInspectedObject call that tells us which Core::Object a remote
client is currently looking it. Objects get notified when they gain
their first inspector, and when they lose their last one.
|
|
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
|
|
Now that Vector uses size_t, we can remove a whole bunch of redundant
casts to size_t.
|
|
Previously, this function was using `AK::String::to_uint()`, which is
wrong considering the function returns type `int`. This also means that
configuration files would revert to the default value on negative
values.
|
|
|