Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple processes #492

Closed
LHLaurini opened this issue Apr 2, 2021 · 5 comments
Closed

Support for multiple processes #492

LHLaurini opened this issue Apr 2, 2021 · 5 comments

Comments

@LHLaurini
Copy link

/* TODO(pscollins): We don't support fork() for now, but maybe one day
* we will? */

#define sys_clone sys_ni_syscall
#define sys_vfork sys_ni_syscall

Right now, the fork, vfork and clone syscalls are not implemented. Is it possible to add support for multiple processes?

@LHLaurini
Copy link
Author

Answering my own question, I believe that could be possible. We'd need to actually fork the process, which means we'd lose direct access to lkl. So we'd have to use some form of IPC, possibly shared memory and semaphores.

@tavip
Copy link
Member

tavip commented Apr 2, 2021

Any use-case you have in mind? Fully implementing fork/clone would require MMU support, which we don't currently have.

@LHLaurini
Copy link
Author

LHLaurini commented Apr 2, 2021

Many programs use fork, like sh, make, some compilers, etc... So not supporting it could limit possible applications.

More specifically, I had intended to use lkl for compiling stuff that needs chroot and mount (like Linux from Scratch) without requiring root or even being able to compile it on Windows.

@tavip
Copy link
Member

tavip commented Apr 2, 2021

This is not a use-case that we plan to suport with LKL. UML or VMs are better suited for these kind of uses-cases.

@LHLaurini
Copy link
Author

Indeed, UML fits my use case better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants