Re: serial callout devices

Bernd Eckenfels (ecki@lina.inka.de)
Wed, 2 Jun 1999 02:25:48 +0200


In article <199906010308.XAA19627@dcl.MIT.EDU> you wrote:
> That's because I submitted the patches to the FSF Shellutils maintainer
> over a year ago, and by the maintainer's own admission, he's been
> lame.....

The patches are in stty from debian already and I just added an O_NONBLOCK
to slattch in the net-utils.

> + fd = open(device_name, O_RDONLY|O_NONBLOCK);
> + if (fd < 0)
> + error(1, errno, device_name);
> + if ((fdflags = fcntl(fd, F_GETFL)) == -1
> + || fcntl(fd, F_SETFL, fdflags & ~O_NONBLOCK) < 0)
> + error(1, errno, _("couldn't reset non-blocking mode"));

BTW: the resetting of O_NONBLOCK is done that the code does not need to trap
interrupted operations on that file descriptor, right? I guess I should add
that to slattach.

Greetings
Bernd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/