linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Why are not processes HUPped when they open /dev/console?
Date: Wed, 25 Jan 2012 22:38:40 +0100	[thread overview]
Message-ID: <4F207660.500@suse.cz> (raw)

Hello,

don't you remember by a chance the reason for this test in __tty_hangup:
  if (filp->f_op->write != tty_write)

The logic there is not to HUP processes that have this tty open via
/dev/console.

It is there like forever. But now, due to that, processes that do
vhangup of /dev/ttyXYZ wait infinitely if there is some other process
that has the ttyXYZ open through /dev/console. (Due to infinite wait in
tty_ldisc_hangup.)

This happens on some distros on shutdown path because they do vhangup on
all tty[0-8] ttyS[01] and similar.

thanks,
-- 
js
suse labs

             reply	other threads:[~2012-01-25 21:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25 21:38 Jiri Slaby [this message]
2012-01-25 21:45 ` Why are not processes HUPped when they open /dev/console? Alan Cox
2012-01-26 13:15   ` Jiri Slaby
2012-02-06 19:24     ` Pavel Machek
2012-02-07  9:58       ` Jiri Slaby

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=4F207660.500@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).