Having to clone the vma each time runas is executed brings a significant
slowdown to the "start" operation when done with attached application,
and to the file creation needed when an application is attaching to the
sessiond. Use CLONE_VM flag to speed this up.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* where the stack grows up (HPPA).
*/
pid = clone(child_run_as, child_stack + (CHILD_STACK_SIZE / 2),
- CLONE_FILES | SIGCHLD,
+ CLONE_FILES | SIGCHLD | CLONE_VM,
&run_as_data, NULL);
if (pid < 0) {
perror("clone");