Thread View: mod.computers.ridge
1 messages
1 total messages
Started by bogstad
Thu, 10 Jul 1986 21:09
BUG in error return from ioctl()
Author: bogstad
Date: Thu, 10 Jul 1986 21:09
Date: Thu, 10 Jul 1986 21:09
40 lines
1469 bytes
1469 bytes
The following program demonstrates a bug in the ioctl() support
for ROS 3.3 update 3. When compiled and run normally it prints "worked"
to the terminal. When run with standard output redirected to a file -
"foo > file" - an error message is reported by the ioctl() as expected.
Unfortunately the error message is #14, "Bad address" rather then the
correct #25, "Not a typewriter".
Bill Bogstad
bogstad@hopkins-eecs-bravo.arpa
P.S. If somebody at Ridge is reading this please consider this
a request for an SPR.
---cut here---
#include <stdio.h>
#include <termio.h>
char *progname;
extern int errno;
main(argc, argv)
int argc;
char *argv[];
{
struct termio old;
progname = *argv;
if(ioctl(1, TCGETA, &old) == -1) {
fprintf(stderr, "errno = %d\n", errno);
perror(progname);
exit(1);
}
printf("worked\n");
exit(0);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads