1.1 --- a/servers/process_server.cc Sun Mar 19 17:58:10 2023 +0100
1.2 +++ b/servers/process_server.cc Sun Mar 19 19:38:07 2023 +0100
1.3 @@ -22,6 +22,7 @@
1.4 #include <l4/sys/debugger.h>
1.5 #include <l4/sys/err.h>
1.6
1.7 +#include <fsclient/client.h>
1.8 #include <ipc/thread.h>
1.9
1.10 #include <stdio.h>
1.11 @@ -30,6 +31,7 @@
1.12 #include <exec/process_creator_resource.h>
1.13 #include <fsserver/resource_server.h>
1.14 #include <systypes/env.h>
1.15 +#include <systypes/fcntl.h>
1.16
1.17
1.18
1.19 @@ -59,7 +61,16 @@
1.20 return 1;
1.21 }
1.22
1.23 - ProcessCreatorResource creator(rm_filename);
1.24 + file_t *rm_file = client_open(rm_filename, O_RDONLY);
1.25 +
1.26 + if (!client_opened(rm_file))
1.27 + {
1.28 + err = (rm_file == NULL) ? -L4_ENOMEM : rm_file->error;
1.29 + printf("Could not open region mapper file: %s\n", l4sys_errtostr(err));
1.30 + return 1;
1.31 + }
1.32 +
1.33 + ProcessCreatorResource creator(rm_filename, rm_file);
1.34
1.35 /* Register a server associating it with the given object. */
1.36