From owner-freebsd-hackers Sat Sep 27 01:51:37 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA11108 for hackers-outgoing; Sat, 27 Sep 1997 01:51:37 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id BAA11088 for ; Sat, 27 Sep 1997 01:51:10 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id KAA17914 for freebsd-hackers@FreeBSD.ORG; Sat, 27 Sep 1997 10:51:07 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id KAA16209; Sat, 27 Sep 1997 10:40:08 +0200 (MET DST) Message-ID: <19970927104008.PZ43927@uriah.heep.sax.de> Date: Sat, 27 Sep 1997 10:40:08 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG Subject: Re: ee taking up weird cpu amount. References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Daniel O'Callaghan on Sep 25, 1997 16:28:12 +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Daniel O'Callaghan wrote: > Kill the process. The vty has been disconnected without logging out, so > ee goes into a loop. vi and pico do the same thing. Btw., it seems to be a bug in ncurses. ee correctly checks for an error return from wgetch() (albeit using -1, as opposed to the opaque macro ERR), but wgetch() is returning 0. (gdb) step Single stepping until exit from function wrefresh, which has no line number information. main (argc=2, argv=0xefbfd7e4) at /usr/src/usr.bin/ee/ee.c:608 608 in = wgetch(text_win); (gdb) 609 if (in == -1) (gdb) print in $2 = 0 (gdb) list 604 605 while(edit) 606 { 607 wrefresh(text_win); 608 in = wgetch(text_win); 609 if (in == -1) 610 exit(0); 611 612 resize_check(); 613 -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)