file: module and character special files

Bengt Kleberg bengt.kleberg@REDACTED
Tue Mar 2 13:53:29 CET 2004


klacke@REDACTED wrote:

>On Fri, Jan 30, 2004 at 05:15:39PM +0100, Patrik Nyblom wrote:
>
>  
>
>>Someone decided, a long time ago, that EISDIR was a good return value 
>>here, when something
>>on the line of "this is not a regular file" would have been better. That 
>>
>>    
>>
...deleted

>2. Programmers that write code that rely on the above bug: such as
>   for example:
>
>
>
>open_dev(F) ->
>    case file:open(F, read) of
>       {ok, Fd} ->
>            do_dev_shit(Fd);
>	{error, eisdir} ->
>	    %% Ahhhh, it's gotta be /dev/null or somesuch
>	    do_clever_chardev_stuff(F);
>  
>

...deleted

once i went to a conference on real time systems. one speaker was mr 
parnas (yes, that mr parnas :-).
he told us about the re-writing of the code in a navy attack-plane. one 
thing they wanted to correct was the ''error'' message displayed when 
the flight level indicator (altimeter) broke. (it displayed 22000 feet, 
since some programmer had decideed it would be a good idea to show the 
average flight level when no value was available).
however, the navy absolutly forbid them to change 22000 feet to 
''error'' or ''broke'' or some such. they had loads of training 
material, and already trained pilots, who all where told that if the 
altimeter ever showed 22000 feet (an altitude they never flew at), they 
where supposed to climb (if flying low) and return to base as fast as 
possible.


bengt

This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.




More information about the erlang-questions mailing list