File:  [NetBSD Developer Wiki] / wikisrc / projects / project / pkgsrc_spawn_support.mdwn
Revision 1.10: download - view: text, annotated - select for diffs
Fri Feb 20 17:42:22 2015 UTC (4 years ago) by mspo
Branches: MAIN
CVS tags: HEAD
add 'milestones' to a bunch of pojects, take 3

[[!template id=project

title="Spawn support in pkgsrc tools"


[Aleksej Saushev](

duration="3 months"

There exist two ways of launching processes: one is forking them
with fork or vfork and replacing the clone with exec-family function,
another is spawning process directly with procedures like posix_spawn.
Not all platforms implement fork model, and spawn model has its own merits.

pkgsrc relies heavily on launching subprocesses when building software.
NetBSD posix_spawn support was implemented in GSoC 2011, it is included
in NetBSD 6.0. Now that NetBSD supports both ways, it would be nice to
compare the efficiency of both ways of launching subprocesses and measure
its effect when using pkgsrc (both in user and developer mode).
In order to accomplish that, the following tools should support posix_spawn:

* devel/bmake
* shells/pdksh
* NetBSD base make
* NetBSD sh
* NetBSD base ksh
* potentially some other tools (e.g. lang/nawk, shells/bash, lang/perl5)

Optionally, MinGW spawn support can be added as well.


* support starting processes and subprocesses by posix_spawn in devel/bmake
* support starting processes and subprocesses by posix_spawn in shells/pdksh,
* measure its efficiency and compare it to traditional fork+exec.

[[!tag gsoc]]

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb