Could some one please point me to or give me example code to do the L4Re equivalent of UNIX exec(), spawn a new process?
thanks
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
On 22.10.2014 17:09, teclis High Elf wrote:
Could some one please point me to or give me example code to do the L4Re equivalent of UNIX exec(), spawn a new process?
as Adam already told you in his mail from Oct 21st, starting a new program differs on L4 from how it is done in UNIX. The basic steps are:
* Create a new task object to represent the address space. * Inspect the ELF binary you want to run and load the respective segments into this new address space. * Set up initial capabilities for the new task. These are necessary, so that the task has a memory manager, memory allocater, namespace etc. set. * Create a thread within the new task and let it run from the ELF binary's start address.
There is a libloader that wraps most of this, especially the setup and binary loading part. Example users of libloader are pkg/moe, pkg/ned, and pkg/plr.
Bjoern
Ok Thank you very much for taking the time to clarify. ________________________________________ From: l4-hackers [l4-hackers-bounces@os.inf.tu-dresden.de] on behalf of Björn Döbel [doebel@os.inf.tu-dresden.de] Sent: Thursday, October 23, 2014 2:36 AM To: l4-hackers@os.inf.tu-dresden.de Subject: Re: exec()
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
On 22.10.2014 17:09, teclis High Elf wrote:
Could some one please point me to or give me example code to do the L4Re equivalent of UNIX exec(), spawn a new process?
as Adam already told you in his mail from Oct 21st, starting a new program differs on L4 from how it is done in UNIX. The basic steps are:
* Create a new task object to represent the address space. * Inspect the ELF binary you want to run and load the respective segments into this new address space. * Set up initial capabilities for the new task. These are necessary, so that the task has a memory manager, memory allocater, namespace etc. set. * Create a thread within the new task and let it run from the ELF binary's start address.
There is a libloader that wraps most of this, especially the setup and binary loading part. Example users of libloader are pkg/moe, pkg/ned, and pkg/plr.
Bjoern
_______________________________________________ l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
l4-hackers@os.inf.tu-dresden.de