Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ HOST_ONLY_TEST_SRCS := \
tests/host/distro_abi_test.cpp \
tests/host/ddk_dummy_test.cpp \
tests/host/ddk_kernel_services_test.cpp \
tests/host/file_syscalls_test.cpp \
tests/host/syscall_helpers_test.cpp \
tests/host/process_subsystem_test.cpp \
drivers/dummy/DummyDriver.cpp \
tests/host/socket_syscall_test.cpp \
tests/host/gicv2_test.cpp \
Expand Down
2 changes: 1 addition & 1 deletion kernel/process/Signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void deliver_pending_signals(HAL::CpuContext& ctx) noexcept {
exit_current_process(128 + static_cast<int64_t>(sig));
}

const SigAction& act = proc->signals().action(sig);
const SigAction act = proc->signals().action(sig);
if (act.handler == KERNEL_SIG_IGN) {
proc->signals().restore_saved_mask_if_any();
return;
Expand Down
7 changes: 6 additions & 1 deletion kernel/syscalls/FileSyscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ int64_t sys_chdir(uintptr_t user_path) noexcept {
return ERR_ENOTDIR;
}

build_dentry_path(target, proc->mutable_cwd(), Kernel::Process::MAX_PATH_LEN);
char normalized[Kernel::Process::MAX_PATH_LEN]{};
if (normalize_vfs_path(proc->cwd(), raw_path, normalized, sizeof(normalized))) {
cstr_copy(proc->mutable_cwd(), normalized, Kernel::Process::MAX_PATH_LEN);
} else {
build_dentry_path(target, proc->mutable_cwd(), Kernel::Process::MAX_PATH_LEN);
}
target->release();
return 0;
}
Expand Down
Loading
Loading