keeleysam / tenfourfox

Automatically exported from code.google.com/p/tenfourfox
0 stars 0 forks source link

Implement userland posix_spawn library in terms of vfork/execve/dup2 #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Eventually we will need to deal with IPC for real instead of our gutted 
hal-fassed IPC that isn't ("just enough Chrome"). However, this requires 
writing posix_spawn in userland. Fortunately, the OpenGroup has just such an 
implementation available that we can adapt to our needs: 
http://pubs.opengroup.org/onlinepubs/000095399/xrat/xsh_chap03.html

We will probably just make a simple stub for posix_spawnp since we don't really 
support searching the PATH (i.e., _spawnp just maps to _spawn).

We should compare this to one of the BSD kernel posix_spawn implementations 
after we port it to make sure all the bases are covered.

This will not be done until we have to, because something like this could have 
very subtle bugs, and what we have now does work.

Original issue reported on code.google.com by classi...@floodgap.com on 4 Jun 2011 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Of course, since we have vfork() in 10.4, we should really use that.

Original comment by classi...@floodgap.com on 4 Jun 2011 at 2:25

GoogleCodeExporter commented 9 years ago
Suggested by Jonas Maebe. We need to blot out the FreeBSD-specific yuk, but 
this is more complete than the OpenGroup version.

http://fxr.watson.org/fxr/source/gen/posix_spawn.c?v=FREEBSD-LIBC

Original comment by classi...@floodgap.com on 10 Jun 2011 at 12:34

Attachments: