lkml.org 
[lkml]   [2005]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: In last setsid/tty locking changes...
From
Date
On Gwe, 2005-01-07 at 13:37, Marco Cipullo wrote:
> In last setsid/tty locking changes:
> + down(&tty_sem);
> current->signal->tty = NULL;
> + up(&tty_sem);
>
> /* Block and flush all signals */
> sigfillset(&blocked);
>
> Sorry for the silly question, but why is needed a semaphore to write just one
> value without read/write nothing else?

Look at the tty init_dev code paths and it might make more sense. It
doesn't just say "protect this write" more importantly it says "don't do
this in parallel with tty setup"

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.029 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site