this is sys_getpid() on 2.4.19
asmlinkage long sys_getpid(void)
{
/* This is SMP safe - current->pid doesn't change */
return current->tgid;
}
I assume we are returning tgid so that no matter what thread of a
multithreaded program calls getpid we return the same value, and that
the comment with pid is old and should have been updated when it was
changed to return tgid. A student in my Operating Systems class pointed
this out, so I figured no harm in pointing the possible bug out.
thanks,
shaya
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:30 EST