Actions
Feature #116
closed
WA
WA
Port the process code
Feature #116:
Port the process code
Description
There is a part of the editor that is about launching different processes. That will help with plugins. This is using pipe() and fork(), things that do not exist in newlib, but some of them exist in clib4.
The first approach should be to use clib4 for the port, and change the missing functions with something that exists and works.
If the above doesn't work I need to do my own implementation, which should be based on OS4 API.
It is needed to do a research what should be used on MorphOS and what actually exists there. This might require a different approach, which might define what should be done with the OS4 port as well.
WA Updated by walkero 5 months ago
if process is compiled with newlib I get the following errors
src/api/process.c: In function ‘process_start’:
src/api/process.c:507:11: error: implicit declaration of function ‘pipe’ [-Werror=implicit-function-declaration]
507 | if (pipe(self->child_pipes[i]) || fcntl(self->child_pipes[i][i == STDIN_FD ? 1 : 0], F_SETFL, O_NONBLOCK) == -1) {
| ^~~~
src/api/process.c:525:23: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
525 | self->pid = (long)fork();
| ^~~~
src/api/process.c:533:9: error: implicit declaration of function ‘setpgid’; did you mean ‘setgid’? [-Werror=implicit-function-declaration]
533 | setpgid(0,0);
| ^~~~~~~
| setgid
src/api/process.c:552:9: error: implicit declaration of function ‘execvp’ [-Werror=implicit-function-declaration]
552 | execvp(cmd[0], (char** const) cmd);
with clib4 I get the following
src/api/process.c: In function ‘process_start’:
src/api/process.c:525:23: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
525 | self->pid = (long)fork();
| ^~~~
src/api/process.c:533:9: error: implicit declaration of function ‘setpgid’; did you mean ‘setgid’? [-Werror=implicit-function-declaration]
533 | setpgid(0,0);
| ^~~~~~~
| setgid
Actions