[Freeciv-Dev] stdin no more echoed to screen (PR#1855)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] stdin no more echoed to screen (PR#1855),
nightmare <=
|
|