projects
/
platform
/
upstream
/
zypper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50fc273
)
Return default on EOF after poll() in read_action_ari_with_timout().
author
Ján Kupec
<jkupec@suse.cz>
Sun, 15 Feb 2009 17:10:06 +0000
(18:10 +0100)
committer
Ján Kupec
<jkupec@suse.cz>
Sun, 15 Feb 2009 17:10:06 +0000
(18:10 +0100)
src/utils/prompt.cc
patch
|
blob
|
history
diff --git
a/src/utils/prompt.cc
b/src/utils/prompt.cc
index
fb785f4
..
4a9ddf6
100644
(file)
--- a/
src/utils/prompt.cc
+++ b/
src/utils/prompt.cc
@@
-145,6
+145,14
@@
read_action_ari_with_timeout(PromptId pid, unsigned timeout, int default_action)
do {} while (getchar() != '\n');
return reply_int;
}
+ else if (feof(stdin))
+ {
+ zypper.out().info(zypp::str::form(_("Retrying in %u seconds..."), timeout));
+ WAR << "no good input, returning " << default_action
+ << " in " << timeout << " seconds." << endl;
+ sleep(timeout);
+ return default_action;
+ }
else
WAR << "Unknown char " << reply << endl;
}