-
- // Create child process
- pid = clone(CLONE_VM, 0);
+
+ uinfo = GetUserInfo(uid);
+ struct s_sys_spawninfo spawninfo;
+ spawninfo.flags = 0;
+ spawninfo.gid = uinfo->GID;
+ spawninfo.uid = uinfo->UID;
+ const char *child_argv[2] = {"-", 0};
+ const char **child_envp = NULL;
+ int fds[] = {0, 1, 2};
+ pid = _SysSpawn(uinfo->Shell, child_argv, child_envp, 3, fds, &spawninfo);