liblaunch: implement stdio handle initialisation for child task

This commit is contained in:
2026-04-01 18:53:28 +01:00
parent 28d986c628
commit 3a9539adbc
2 changed files with 16 additions and 0 deletions
+2
View File
@@ -64,6 +64,8 @@ struct launch_parameters {
size_t p_channel_count;
void *p_resolver_arg;
kern_handle_t p_stdio[3];
};
struct launch_result {
+14
View File
@@ -209,6 +209,20 @@ enum launch_status launch_ctx_execute(
remote_stack_buf + STACK_SIZE);
virt_addr_t bsdata = write_bootstrap_data(&stack, interp_path, params);
for (int i = 0; i < 3; i++) {
if (params->p_stdio[i] == KERN_HANDLE_INVALID) {
continue;
}
kern_handle_transfer(
KERN_HANDLE_INVALID,
params->p_stdio[i],
remote_task,
i,
HANDLE_TRANSFER_MOVE,
NULL);
}
virt_addr_t ip = image.e_hdr.e_entry + image.e_remote_base;
kern_handle_t thread;