Bug 21697

Summary: libedit does not #include <fcntl.h> causing some code in read.c to be ifdef'd out
Product: Base System Reporter: barak_enat <barak_enat>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   

Description barak_enat 2000-10-02 11:30:01 UTC
in libedit the file read.c include some code to handle the case of stdin becoming NON blocking. this is done in the function read__fixio.
however, the # if defined(F_SETFL) && defined(O_NDELAY) line is evaluated to false preventing this code from compiling. this is because Cis missing from the compilation.

Fix: 

fix the compilation to have
#include <fcntl.h>
How-To-Repeat: to see the problem run sh -E, and then execute a program that sets STDIN to NB mode. when the program terminates, sh keeps beeping, since libedit doesn't return STDIN to blocking mode.
Comment 1 Brian Somers freebsd_committer freebsd_triage 2000-10-02 23:08:04 UTC
State Changed
From-To: open->closed

Fixed in -current - thanks. 
I'll MFC in a week.