* 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");
* Parent: wait for child to return, in which case the
* shared memory map will have been created.
*/
- pid = wait(&status);
+ pid = waitpid(pid, &status, 0);
if (pid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
perror("wait");
ret = -1;
{
struct open_data data;
+ DBG3("open() %s with flags %X mode %d for uid %d and gid %d",
+ path, flags, mode, uid, gid);
data.path = path;
data.flags = flags;
data.mode = mode;