diff options
author | Eduard-Gabriel Munteanu <maxdamage@aladin.ro> | 2007-07-15 23:38:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 09:05:38 -0700 |
commit | 89df6bfc04059716de2eb2fe529f05b3e124fafd (patch) | |
tree | 5f28a79bc65549f48e153f18b1692d9cf462c628 /arch/um/drivers/xterm.c | |
parent | e18eecb8b35703a5eea73ee2b45324262029e62c (diff) | |
download | linux-89df6bfc04059716de2eb2fe529f05b3e124fafd.tar.gz linux-89df6bfc04059716de2eb2fe529f05b3e124fafd.tar.bz2 linux-89df6bfc04059716de2eb2fe529f05b3e124fafd.zip |
uml: DEBUG_SHIRQ fixes
DEBUG_SHIRQ generates spurious interrupts, triggering handlers such as
mconsole_interrupt() or line_interrupt(). They expect data to be available to
be read from their sockets/pipes, but in the case of spurious interrupts, the
host didn't actually send anything, so UML hangs in read() and friends.
Setting those fd's as O_NONBLOCK makes DEBUG_SHIRQ-enabled UML kernels boot
and run correctly.
Signed-off-by: Eduard-Gabriel Munteanu <maxdamage@aladin.ro>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers/xterm.c')
-rw-r--r-- | arch/um/drivers/xterm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 571c2b3325d5..fe238e03a300 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c @@ -151,6 +151,13 @@ int xterm_open(int input, int output, int primary, void *d, goto out; } + err = os_set_fd_block(new, 0); + if (err) { + printk("xterm_open : failed to set xterm descriptor " + "non-blocking, err = %d\n", -err); + goto out; + } + CATCH_EINTR(err = tcgetattr(new, &data->tt)); if(err){ new = err; |