Changeset 192 in openpam for trunk


Ignore:
Timestamp:
Jan 3, 2003, 3:34:13 AM (17 years ago)
Author:
Dag-Erling Smørgrav
Message:

Have prompt() return NULL if EOF occurred on stdin, instead of acting
as if the user had just pressed enter.

Obtained from: TrustedBSD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_ttyconv.c

    r187 r192  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#14 $
     34 * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#15 $
    3535 */
    3636
     
    9090        sigprocmask(SIG_SETMASK, &saved_sigset, NULL);
    9191        alarm(saved_alarm);
    92         if (timed_out || ferror(stdin))
     92        if (timed_out || ferror(stdin) || feof(stdin))
    9393                return (NULL);
    9494        /* trim trailing whitespace */
Note: See TracChangeset for help on using the changeset viewer.