]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
don't call exit in library
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 10 Nov 2010 16:57:11 +0000 (17:57 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 10 Nov 2010 17:12:32 +0000 (18:12 +0100)
The feof() detection of closed stdin doesn't work anyway.

newt.c

diff --git a/newt.c b/newt.c
index f3f49ff7a25c43eae7a8a5290c742f75c3b50992..4e37bc1e0a6d91404b64d605c5ac8d5ab205207c 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -565,10 +565,7 @@ int newtGetKey(void) {
        if (key == SLANG_GETKEY_ERROR) {
            /* Either garbage was read, or stdin disappeared
             * (the parent terminal was proably closed)
-            * if the latter, die.
             */
-           if (feof(stdin))
-                   exit(1);
            if (needResize) {
                 needResize = 0;
                return NEWT_KEY_RESIZE;