public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marco Cipullo <cipullo@libero.it>
To: linux-kernel@vger.kernel.org
Subject: In last setsid/tty locking changes...
Date: Fri, 7 Jan 2005 14:37:02 +0100	[thread overview]
Message-ID: <200501071437.02426.cipullo@libero.it> (raw)

In last setsid/tty locking changes:

diff -Nru a/kernel/exit.c b/kernel/exit.c
--- a/kernel/exit.c	2005-01-07 05:24:41 -08:00
+++ b/kernel/exit.c	2005-01-07 05:24:41 -08:00
@@ -332,7 +332,9 @@
 	exit_mm(current);
 
 	set_special_pids(1, 1);
+	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?

Bye
Marco

             reply	other threads:[~2005-01-07 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 13:37 Marco Cipullo [this message]
2005-01-07 15:45 ` In last setsid/tty locking changes Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501071437.02426.cipullo@libero.it \
    --to=cipullo@libero.it \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox