Author: Tord Romstad
Date: 03:41:10 04/14/04
Go up one level in this thread
On April 14, 2004 at 05:31:33, Sune Fischer wrote:
>Testing for NULL doesn't seem to work, it still hangs when the GUI crashes.
>
>Perhaps I'm doing it wrong, should it be if (stdin==NULL)?
I do like this:
char command[256];
if(fgets(command, 256, stdin)==NULL)
strcpy(command, "quit\n");
handle_command(command);
Tord
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.