28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A–29<br />

RUMPCLIENT(3) NetBSD Library Functions Manual RUMPCLIENT(3)<br />

rumpclient_vfork()<br />

Like above, but <strong>the</strong> host uses vfork(2).<br />

rumpclient_prefork()<br />

Low-level routine which instructs <strong>the</strong> rump kernel that <strong>the</strong> current<br />

process is planning to fork. <strong>The</strong> routine returns a non-NULL cookie<br />

if successful.<br />

rumpclient_fork_init(rfp)<br />

Low-level routine which works like rumpclient_init(), with <strong>the</strong><br />

exception that it uses <strong>the</strong> rfp context created by a call to<br />

rumpclient_prefork(). This is typically called from <strong>the</strong> child <strong>of</strong> a<br />

fork(2) call.<br />

rumpclient_fork_cancel(rfp)<br />

Cancel previously initiated prefork context. This is useful for<br />

error h<strong>and</strong>ling in case a full fork could not be carried through.<br />

rumpclient_exec(path, argv, envp)<br />

This call is a rumpclient wrapper around execve(2). <strong>The</strong> wrapper<br />

makes sure that <strong>the</strong> rump kernel process context stays <strong>the</strong> same in<br />

<strong>the</strong> newly executed program. This means that <strong>the</strong> rump kernel PID<br />

remains <strong>the</strong> same <strong>and</strong> <strong>the</strong> same rump file descriptors are available<br />

(apart from ones which were marked with FD_CLOEXEC).<br />

It should be noted that <strong>the</strong> newly executed program must call<br />

rumpclient_init() before any o<strong>the</strong>r rump kernel communication can<br />

take place. <strong>The</strong> wrapper cannot do it because it no longer has program<br />

control. However, since all rump clients call <strong>the</strong> init routine,<br />

this should not be a problem.<br />

NetBSD 5.99.48 February 16, 2011 NetBSD 5.99.48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!