Subject: Re: fdesc filesystem?
To: None <,>
From: Olaf Seibert <>
List: current-users
Date: 06/02/1995 21:21:52
>>>>> "Olaf" == Olaf Seibert <> writes:

Olaf> I was compiling a program that basically did

Olaf> 	fd = open("/dev/tty", ...); FD_SET(fd, &fdset); err =
Olaf> select(fd+1, &fdset, NULL, NULL, &tv);

Olaf> and this select call did not return until the timeout had
Olaf> passed.  Typing input did not cause a return

Niklas Hallqvist <> wrote:
Niklas> I know nothing about the fdesc thingy, but I just wanted to ask if you
Niklas> are sure that you were not in canonical mode when you tried it the
Niklas> first time?  I fought this over just last week, when I realized stty
Niklas> -a showed me icanon set on the tty I used.
Niklas> Forget this if you are not as stupid as I were...

Well, I was running in canonical mode, but since I typed a whole
line including a return that should not make a difference. What did
make a difference was (as I mentioned) removing fdesc; what also
worked was using fd 0 (stdin) instead.

FYI, the code was from sudo's tgetpass(), a getpass() clone with
timeout. I stripped that code down to make sure the problem wasn't
in any of the other fancy things there.

#!/usr/local/bin/perl --#export-a-crypto-system sig, Diffie-Hellman 2 lines:
s/1/0lG*lm%/g;s/0/d*lm%/g;print `echo 16i\U$g"\nSG$m\Esm1Io$_"p|dc`
___              Copyright 1995 Olaf 'Rhialto' Seibert. All Rights Reserved.
\X/    You are not allowed to read this using any kind if Micro$oft product.