lkml.org 
[lkml]   [1996]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNew tty bug


/*
In the following, the device /dev/cua2, does not physically exist.
Therefore, the following routine should return a -1 and set errno
in some manner.

Instead, it hangs. If you ^C, it crashes. This relates to the setterm
problem that gives people Oopses upon startup. Setterm tries to open
each of these devices. It is done when an open fails.

*/

#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/fcntl.h>

main()
{
int fd;

fd = open("/dev/cua2", O_RDWR|O_NONBLOCK, 0);
fprintf(stdout, "Open() returned %d, (%s)\n", fd, strerror(errno));
return 0;
}

Linux 2.1.15
This bug was reported by myself as soon as the patch was available. I
discovered the bug as soon as I booted with the patched kernel.


Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.15 on an i586 machine.
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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