[Freeciv-Dev] Re: stdin no more echoed to screen (PR#1854)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Jul 29, 2002 at 03:34:43PM -0700, nightmare@xxxxxxxxxx wrote:
> Full_Name: Davide Pagnin
> Version: 1.13.1-devel
> Distribution: Don't know
> Client: Both (or N/A)
> OS:
> Submission from: (NULL) (193.205.80.85)
>
> I was working with rulesets, and found that the civserver on EXIT_FAILURE
> don't restore properly the stdin.
I know about this. But haven't found time to report/fix it.
> In particular, if for any reason, the load of ruleset fail, with LOG_FATAL
> message and subsequently exit, the terminal prompt you get back seems
> normal, but anything you tupe isn't echoed to screen.
>
> This is reproducible as you want, i.e., inside default/units.rulesets
> change the firepower of one unit to 0, this will issue a FATAL error,
> and you'll get the stdin scrambled.
>
> The faulty server has readline enabled (so I don't know if without readline
> the
>
> problem is still present) and is somewhat related to it, infact calling
> rl_callback_handler_remove() before the exit(EXIT_FAILURE) solved the
> issue.
>
> I don't know how to proceed to fix this problem, calling
> rl_callback_handler_remove() before any exit(EXIT_FAILURE) that can happen
> in that part of the code is one possibility.
>
> Another is to call the close_connections_and_socket() function, which
> contains rl_callback_handler_remove().
>
> Another is found another workaround, what is necessary is to have
> sniff_packets properly remove the handler of readline before the
> parsing of ruleset file and restoring it when is called again.
>
> If any suggestion can come on this, I volunteer to make a patc following
> the preferred solution
Either we do a atexit or a new function called "die" or "myexit" or
similar and replace the exit calls with this. The first one would be
easier to code.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"That's fundamental game play! My main enemy is *ALWAYS* fighting
a 4-front war. I make sure of it!"
-- Tony Stuckey, freeciv-dev
|
|