[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: Console taking 100% CPU

Chris Fowler cfowler@outpostsentinel.com
Tue, 14 Dec 2010 22:36:06 GMT

On Tue, 2010-12-14 at 22:31 +0000, Bryan Stansell wrote:
> I should probably fix it to not chew up all the CPU...but it would
> still "hang".  If you can wrap this thing in a pty, the code will
> detect it as such and actually close things down on EOF.  Or adjust
> the 'screwy' (yeah, pleasant name) variable in console.c so it is
> always 1 - pretends all connections are pty-based.
The pty solution would be a good one and would allow the console code to
remain pristine.

In "APUE"  by Richard Stevens (deceased) there is an example on how to
do this.