Subject: Re: fdesc filesystem?
To: None <niklas@appli.se, rhialto@mbfys.kun.nl>
From: Olaf Seibert <rhialto@mbfys.kun.nl>
List: current-users
Date: 06/02/1995 21:21:52
>>>>> "Olaf" == Olaf Seibert <rhialto@mbfys.kun.nl> 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 <niklas@appli.se> 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> 
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.

-Olaf.
--
HAVE *YOU* EXPORTED A CRYPTO SYSTEM TODAY? --> http://dcs.ex.ac.uk/~aba/x.html
-------------------------------------8<-------------------------------------
#!/usr/local/bin/perl --#export-a-crypto-system sig, Diffie-Hellman 2 lines:
($g,$e,$m)=@ARGV;$_=unpack('B*',pack('H*',1&length$e?"0$e":$e));s/^0+//;
s/1/0lG*lm%/g;s/0/d*lm%/g;print `echo 16i\U$g"\nSG$m\Esm1Io$_"p|dc`
-------------------------------------8<-------------------------------------
___              Copyright 1995 Olaf 'Rhialto' Seibert. All Rights Reserved.
\X/    You are not allowed to read this using any kind if Micro$oft product.