Undefine
6fa705c730
LibCore: Mark Process::wait_for_termination as const
...
After removal of the of the disown mechanism this can be marked as
const, which in my opinion makes sense for this API.
2025-11-07 11:27:51 +01:00
Undefine
769bbe6021
LibCore: Remove unused KeepAsChild and disown mechanisms
...
Those went unused and did nothing on systems other than SerenityOS.
2025-11-07 11:27:51 +01:00
Undefine
7a9dd46a39
LibCore: Remove unused Process::set_name
...
It went unused and was a no-op on systems other than SerenityOS.
2025-11-07 11:27:51 +01:00
Undefine
3c0d787c53
LibCore: Remove unused working_directory parameter
...
This was unused and a no-op on systems other than SerenityOS.
2025-11-07 11:27:51 +01:00
Nico Weber
9272df7a86
Everywhere: Fix a few unreachable-return / unreachable-break warnings
...
I was playing with clang's -Wunreachable-code-aggressive a bit.
This fixes a handful uncontroversial things it flags.
No behavior change.
2025-09-12 14:33:14 +01:00
Jelle Raaijmakers
bc7658d3d3
LibCore: Don't send SIGTRAP when debugger attaches
...
Both gdb and lldb interrupt execution after attaching to the process, so
no need to send a SIGTRAP immediately after which would require typing
`continue` in the debugger twice.
2025-08-19 06:24:57 -04:00
Timothy Flynn
dceed08058
AK+LibCore: Avoid double-negation of syscall error values
...
This is a remnant from SerenityOS. Let's avoid confusion as to why we
negate errno when we call Error::from_syscall just to negate it again
when we store the error code.
2025-05-10 21:19:46 -04:00
Timothy Flynn
27478ec7d4
Everywhere: Run clang-format
...
The following command was used to clang-format these files:
clang-format-19 -i $(find . \
-not \( -path "./\.*" -prune \) \
-not \( -path "./Build/*" -prune \) \
-not \( -path "./Toolchain/*" -prune \) \
-type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2024-12-28 05:39:32 -08:00
Tim Ledbetter
a450d64ffa
LibCore: Return correct error code from Process::wait_for_termination
2024-12-20 14:59:56 +01:00
rmg-x
aa4dcca0b2
LibCore/Process: Add DupFd file action
...
This commit provides a new file action allowing callers to provide a
`write_fd` that Process will "redirect" the child's stdin/stdout to.
2024-12-05 17:02:57 -07:00
stasoid
866609c682
LibCore: Make Process::wait_for_termination return exit code
2024-11-19 14:40:03 -07:00
stasoid
3468a83e45
LibCore: Port Process to Windows
...
Windows doesn't have a concept of zombie children, hence:
* `disown` not needed
* we need a process handle because otherwise if the process have ended
by the time `wait_for_termination` is called
its pid may be reassigned to other process
2024-11-19 14:40:03 -07:00
stasoid
4a731b3858
LibCore/Process: Make all spawn overloads return ErrorOr<Process>
2024-11-19 14:40:03 -07:00
stasoid
61d52c8a3f
LibCore: Remove Process::spawn(StringView, ReadonlySpan<char const*>)
2024-11-19 14:40:03 -07:00
Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00