Flush stdout when expecting user input on stdin.

This commit is contained in:
Milan Broz
2015-01-10 20:36:49 +01:00
parent e24a72f84c
commit eccf347568

View File

@@ -143,6 +143,7 @@ int yesDialog(const char *msg, void *usrptr __attribute__((unused)))
if(isatty(STDIN_FILENO) && !opt_batch_mode) {
log_std("\nWARNING!\n========\n");
log_std("%s\n\nAre you sure? (Type uppercase yes): ", msg);
fflush(stdout);
if(getline(&answer, &size, stdin) == -1) {
r = 0;
/* Aborted by signal */