yes you are .....
> I said:
> task { pid = 300, pgrp = 301, };
> 301 is free;
>
> get_pid() returns 301.
>
> "task 301" can't call setsid(). pid 301 is available?
The original code is/was:
if(p->pid == last_pid ||
p->pgrp == last_pid ||
p->tgid == last_pid ||
p->session == last_pid) {
if(++last_pid >= next_safe) {
if(last_pid & 0xffff8000)
last_pid = 300;
next_safe = PID_MAX;
}
goto repeat;
}
if any process holds the pgrp=301 as in your case, 301 won't be eligible due
to (p->pgrp == last_pid) check.
-- -- Hubertus Franke (frankeh@watson.ibm.com) - 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/