Re: kernel threads holding /dev/console

From: Måns Rullgård
Date: Sun Mar 14 2004 - 18:17:29 EST

Andrew Morton <akpm@xxxxxxxx> writes:

> mru@xxxxxx (Måns Rullgård) wrote:
>> I'm trying to set up a pivot_root hack to do some things, switch root,
>> and then unmount the original root. However, the unmount fails
>> because ksoftirqd/0, events/0, kblockd/0 and aio/0 have /dev/console
>> opened. Why are they doing this? Can it be prevented? This happens
>> when using kernel 2.6.3 (2.6.4 is reportedly broken on Alpha). It
>> works with a 2.4 kernel using the same script. Does anyone have a
>> hint?
> That's a bug.
> keventd and friends are currently holding /dev/console open three times.
> It's all inherited from init.
> Steal the relevant parts of daemonize() to fix that up.

That did the trick. Thanks for the quick response.

Måns Rullgård
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at