pid: fix mips irix emulation pid usage

[m.kozlowski@tuxland.pl: fix unbalanced parenthesis in irix_BSDsetpgrp()]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Eric W. Biederman
2008-02-08 04:19:16 -08:00
committed by Linus Torvalds
parent ac9a8e3f0f
commit 69440e76f6
3 changed files with 23 additions and 19 deletions

View File

@@ -582,8 +582,8 @@ out:
asmlinkage int irix_getpid(struct pt_regs *regs)
{
regs->regs[3] = current->real_parent->pid;
return current->pid;
regs->regs[3] = task_pid_vnr(current->real_parent);
return task_pid_vnr(current);
}
asmlinkage int irix_getuid(struct pt_regs *regs)
@@ -763,11 +763,11 @@ asmlinkage int irix_setpgrp(int flags)
printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags);
#endif
if(!flags)
error = task_pgrp_nr(current);
error = task_pgrp_vnr(current);
else
error = sys_setsid();
#ifdef DEBUG_PROCGRPS
printk("returning %d\n", task_pgrp_nr(current));
printk("returning %d\n", error);
#endif
return error;
@@ -1093,10 +1093,10 @@ asmlinkage int irix_BSDsetpgrp(int pid, int pgrp)
pid, pgrp);
#endif
if(!pid)
pid = current->pid;
pid = task_pid_vnr(current);
/* Wheee, weird sysv thing... */
if ((pgrp == 0) && (pid == current->pid))
if ((pgrp == 0) && (pid == task_pid_vnr(current)))
error = sys_setsid();
else
error = sys_setpgid(pid, pgrp);