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
Nico Weber
19ac1f6368
Revert "Unicode: s/codepoint/code_point/g"
...
This reverts commit ea9ac3155d
.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00
Andreas Kling
9664bac281
Meta: Add Brian Gianforcaro to the contributors list :^)
2020-08-05 22:06:31 +02:00
Andreas Kling
ad2e84b71a
Browser: Move bookmarks.json to ~/.config
2020-08-05 17:40:47 +02:00
Andreas Kling
4f3e8547d2
Base: Add ~/Documents and put miscellaneous files there
2020-08-05 17:40:47 +02:00
Andreas Kling
db450dbc44
Base: Move "js" and "little" HackStudio projects into ~/Source/
2020-08-05 17:40:47 +02:00
Andreas Kling
bc615572a9
LibCore+Base: Move user-specific config files to $HOME/.config
2020-08-05 17:40:47 +02:00
AnotherTest
7b15c85ff5
Shell: Do not assume that stdin/stdout is a TTY
...
This closes #2989 .
2020-08-05 17:30:31 +02:00
AnotherTest
70eb7aa627
LibLine: Check if operating on a TTY before using TTY features
...
This makes the line editor behave well when input is passed in from
pipes as well.
2020-08-05 17:30:31 +02:00
Brian Gianforcaro
a7ea7b3a66
AK: Decorate AK::Result<V, E> with [[nodiscard]]
2020-08-05 17:29:44 +02:00
Nico Weber
a9fb317a63
Build: Clang should get -Werror too
...
I accidentally removed it in a619943001
and #3002 only restored
it for gcc.
2020-08-05 17:29:15 +02:00
Brian Gianforcaro
adb83d3adc
AK: Decorate AK::TriState with [[nodiscard]]
...
TriState is another type of return code, it's value should always be
observed.
2020-08-05 17:29:01 +02:00
Brian Gianforcaro
3319803bd9
AK: Decorate atomic compare exchange operations with [[nodiscard]]
...
All CAS operations should always check return values, so they are
robust to failure in the event of conflict in parallel operation.
2020-08-05 17:28:44 +02:00