Linus Groh
4ba23745c0
Userland: Use Core::ArgsParser for 'which'
2020-08-06 20:41:13 +02:00
Linus Groh
cf81d9765c
Userland: Use Core::ArgsParser for 'yes'
2020-08-06 20:41:13 +02:00
Nico Weber
3cc9e8ba41
LibLine+Shell: Remove unused split_mechanism
...
It was only read in should_break_token(), which had no callers.
should_break_token() also got `foo\\ bar` and `"foo bar"` wrong.
2020-08-06 20:37:39 +02:00
Nico Weber
7f7dd3cf9c
LibLine: Add binding for Alt-.
2020-08-06 20:37:17 +02:00
Tibor Nagy
6be3f914f0
Base: Update Hungarian keymap with accented characters and more symbols
...
Also fixing a bug where the numpad keys were accidentally shifted by
one position in the JSON array.
2020-08-06 20:36:50 +02:00
Andreas Kling
1c7faa8965
LibWeb: Move text selection serialization from PageView to Frame
...
This logic doesn't depend on anything at the widget layer, so it can
move down to the frame layer.
2020-08-06 19:59:24 +02:00
Nico Weber
90efba95c1
LibLine: Add bindings for Alt-u, Alt-l, Alt-c
2020-08-06 19:48:30 +02:00
Nico Weber
5d343e1c29
LibLine: Add comments for which keys trigger VWERASE and VKILL
2020-08-06 19:03:06 +02:00
Nico Weber
f29c5c3a41
LibLine: Add Alt-d binding to forward-delete a word
2020-08-06 19:03:06 +02:00
Edgar Araújo
e521daeedc
Keymaps: Add European Portuguese keymap
2020-08-06 17:53:42 +02:00
Muhammad Zahalqa
5fe6c13e5b
LibThread: Remove redundant r/w of atomic variable in Lock::lock() ( #3013 )
...
m_holder.compare_exchange_strong(expected, desired, ...)
will either successfully update the value to desired if == expected
or put the current value in expected otherwise.
2020-08-06 17:50:25 +02:00
Nico Weber
4d9d054386
Shell: Start adding some alt shortcuts
...
This adds Alt-f to go forward by a word, and Alt-b to go backward
by a word (like ctrl-arrow-left / ctrl-arrow-right already do).
Behind the scenes, alt-key is implemented by sending <esc> followed
by that key, and typing <esc> f/b for moving by a word hence works
too (in all other shells too, not just in Serenity's).
While here, rename some InputState enum values to make the slightly
expanded use of <esc> clearer, and expand a few comments.
2020-08-06 17:45:31 +02:00
Valtteri Koskivuori
471083ca3d
ProcFS: Expose the current kernel keymap as /proc/keymap
...
Programs can now ask the kernel which keymap is in use by reading from /proc/keymap
2020-08-06 17:45:06 +02:00
Valtteri Koskivuori
00a0e525e6
Kernel+LibKeyboard: Store the keymap name when setting system keymap
...
This way we can query the kernel to see which keymap is currently in use.
2020-08-06 17:45:06 +02:00
Andreas Kling
8dd0c391e9
Shell: Make "fg" set the TTY PGID before SIGCONT'ing the job
...
Otherwise the child will get SIGTTIN/SIGTTOU on next TTY I/O.
2020-08-06 15:50:57 +02:00
Andreas Kling
0c6ce063e6
Shell: Print job status after suspending a command
2020-08-06 15:33:04 +02:00
Andreas Kling
22dd5a7021
Shell: Move printing job status into a Job::print_status() helper
...
This is only used by the "jobs" builtin right now, but more soon.
2020-08-06 15:09:49 +02:00
Andreas Kling
d9aecc8e08
Shell: Remove unnecessary ignore() in Shell::custom_event()
...
Ignoring an event means that it will bubble to the parent Core::Object.
This is not necessary here.
2020-08-06 14:27:06 +02:00
Andreas Kling
b8440b12b7
Shell: Store jobs as NonnullRefPtr<Job>
2020-08-06 14:09:13 +02:00
Andreas Kling
5bce0193de
Shell: Make Job constructors private and use a create() helper
...
Also store PGIDs as pid_t since that's what they are.
2020-08-06 13:48:45 +02:00
Andreas Kling
bf2cd9374c
Shell: Make run_command() return a NonnullRefPtrVector<Job>
...
This never returns null Job pointers.
2020-08-06 13:44:30 +02:00
Andreas Kling
3055f73d48
AK+Kernel+LibC: Add vdbgprintf()
...
This is like dbgprintf() except it takes a va_list instead of ...
2020-08-06 13:36:06 +02:00
Andreas Kling
2f1d596dd3
UserspaceEmulator: Fix bad rc check in ttyname and getcwd syscalls
...
Errors here are (rc < 0), not (rc < 1).
2020-08-06 11:45:52 +02:00
Andreas Kling
0d6597df2b
AK: Remove Stream::operator bool()
...
This was only used in one place, and that caused a bug, so I'm removing
this for now since there are no more uses.
2020-08-06 11:37:33 +02:00
Andreas Kling
4c44c96bc6
LibDebug: Unbreak LineProgram::parse_source_directories()
...
This regressed with ac9f6fd1f8
where
we switched to using InputMemoryStream.
2020-08-06 11:35:40 +02:00
Andreas Kling
078969b92f
LibDebug: Fix bitrotted DWARF_DEBUG code
2020-08-06 11:32:17 +02:00
Andreas Kling
ddab7ab693
Kernel: Store TTY's foreground process as a WeakPtr<Process>
...
This ensures that we don't leave a stale PGID assigned to the TTY after
the process exits, which would make PID recycling attacks possible.
2020-08-06 11:17:53 +02:00
AnotherTest
ff01cfa08a
Shell: Mark suspended children as such when receiving a SIGCHLD
2020-08-06 10:35:22 +02:00
AnotherTest
05972668d1
Kernel: Send a SIGCHLD to the parent upon suspension of a process
...
...that is controlling a TTY.
2020-08-06 10:35:22 +02:00
asynts
b3d1a05261
Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)
...
This function did a const_cast internally which made the call side look
"safe". This method is removed completely and call sites are replaced
with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the
behaviour obvious.
2020-08-06 10:33:16 +02:00
asynts
ac9f6fd1f8
LibDebug: Use InputMemoryStream instead of BufferStream.
...
This removes another call to ByteBuffer::wrap(const void*, size_t).
2020-08-06 10:33:16 +02:00
asynts
5bfa7749c3
AK: Add InputStream abstraction and InputMemoryStream implementation.
2020-08-06 10:33:16 +02:00
asynts
75cde94c6a
AK: Add String constructor from ReadonlyBytes.
2020-08-06 10:33:16 +02:00
asynts
42b4880653
AK: Rename Tests/Span.cpp to Tests/TestSpan.cpp.
2020-08-06 10:33:16 +02:00
asynts
5f7427ba4b
AK: Add Integral and FloatingPoint concepts.
2020-08-06 10:33:16 +02:00
asynts
05abfc0e1f
AK: Rename MakeUnsigned::type to MakeUnsigned::Type.
...
Also renames MakeSigned::type to MakeSigned::Type.
2020-08-06 10:33:16 +02:00
Brian Gianforcaro
7e6fbef8db
Kernel: Partial usage of Userspace<T> for the poll syscall
...
This change mostly converts poll to Userspace<T> with the caveat
of the fds member of SC_poll_params. It's current usage is a bit
too gnarly for me to take on right now, this appears to need a lot
more love.
In addition to enlightening the syscall to use Userspace<T>, I've
also re-worked most of the handling to use validate_read_and_copy
instead of just directly de-referencing the user pointer. We also
appeared to be missing a re-evaluation of the fds array after the
thread block is awoken.
2020-08-06 10:22:44 +02:00
Valtteri Koskivuori
b4a29113e4
Documentation: Add a guide for setting up Qt Creator
...
This was already in video form, but I figured it might be nice to
have this here as well, to make it easier to discover.
2020-08-06 10:22:14 +02:00
Tom
41d2a0e9f7
Kernel: Dequeue dying threads from WaitQueue
...
If a thread is waiting but getting killed, we need to dequeue
the thread from the WaitQueue so that a potential wake before
finalization doesn't happen.
2020-08-06 10:02:55 +02:00
Muhammad Zahalqa
9495eeb075
AK: Make min/max behave like the STL for equivalent inputs ( #2976 )
...
min(a, b) now returns a if both are equivalent.
max(a, b) now returns a if both are equivalent.
2020-08-06 09:58:45 +02:00
Luke
4b6036bc33
Meta: Update CLion configuration to include LibM and generated files
...
Also bumps the CXX Standard to C++20.
2020-08-06 09:43:03 +02:00
Andreas Kling
3ba0164ce0
AK: Fix broken symlink used by JSON test
2020-08-06 00:05:52 +02:00
Andreas Kling
d608d714b9
UserspaceEmulator: Support ioctl(TCGETS) and ioctl(TCSETS)
2020-08-05 22:34:50 +02:00
Andreas Kling
e0e3e5b9b1
UserspaceEmulator: Add the access syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
c497603177
UserspaceEmulator: Add the getcwd syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
b187a42e53
UserspaceEmulator: Add the ttyname syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
9d93e208ac
UserspaceEmulator: Support ioctl(TIOCSPGRP)
2020-08-05 22:34:50 +02:00
Andreas Kling
3717a00290
UserspaceEmulator: Add the getpgrp syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
8dea25d974
UserspaceEmulator: Add support for UNIX signals :^)
...
The emulator will now register signal handlers for all possible signals
and act as a translation layer between the kernel and the emulated
process.
To get an accurate simulation of signal handling, we duplicate the same
trampoline mechanism used by the kernel's signal delivery system, and
also use the "sigreturn" syscall to return from a signal handler.
Signal masking is not fully implemented yet, but this is pretty cool!
2020-08-05 22:34:50 +02:00
Nico Weber
ce95628b7f
Unicode: Try s/codepoint/code_point/g again
...
This time, without trailing 's'. Ran:
git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00