View | Details | Raw Unified | Return to bug 2619 | Differences between
and this patch

Collapse All | Expand All

(-)lib/libc/gen/readpassphrase.c (+4 lines)
Lines 133-141 restart: Link Here
133
133
134
	/* Restore old terminal settings and signals. */
134
	/* Restore old terminal settings and signals. */
135
	if (memcmp(&term, &oterm, sizeof(term)) != 0) {
135
	if (memcmp(&term, &oterm, sizeof(term)) != 0) {
136
		const int sigttou = signo[SIGTTOU];
137
138
		/* Ignore SIGTTOU generated when we are not the fg pgrp. */
136
		while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
139
		while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
137
		    errno == EINTR && !signo[SIGTTOU])
140
		    errno == EINTR && !signo[SIGTTOU])
138
			continue;
141
			continue;
142
		signo[SIGTTOU] = sigttou;
139
	}
143
	}
140
	(void)sigaction(SIGALRM, &savealrm, NULL);
144
	(void)sigaction(SIGALRM, &savealrm, NULL);
141
	(void)sigaction(SIGHUP, &savehup, NULL);
145
	(void)sigaction(SIGHUP, &savehup, NULL);

Return to bug 2619