Commit f111076d authored by Russell King's avatar Russell King

[ARM] do_fork() now returns the PID.

parent ad725933
...@@ -238,9 +238,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, ...@@ -238,9 +238,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
*/ */
asmlinkage int sys_fork(struct pt_regs *regs) asmlinkage int sys_fork(struct pt_regs *regs)
{ {
struct task_struct *p; return do_fork(SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL);
p = do_fork(SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* Clone a task - this clones the calling program thread. /* Clone a task - this clones the calling program thread.
...@@ -248,8 +246,6 @@ asmlinkage int sys_fork(struct pt_regs *regs) ...@@ -248,8 +246,6 @@ asmlinkage int sys_fork(struct pt_regs *regs)
*/ */
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs) asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs)
{ {
struct task_struct *p;
/* /*
* We don't support SETTID / CLEARTID * We don't support SETTID / CLEARTID
*/ */
...@@ -259,16 +255,12 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct ...@@ -259,16 +255,12 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct
if (!newsp) if (!newsp)
newsp = regs->ARM_sp; newsp = regs->ARM_sp;
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL); return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int sys_vfork(struct pt_regs *regs) asmlinkage int sys_vfork(struct pt_regs *regs)
{ {
struct task_struct *p; return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL);
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* sys_execve() executes a new program. /* sys_execve() executes a new program.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment