terminal cannot be set.
* src/su.c: Do not set terminal in RAW mode in case of earlier
failure.
+ * src/su.c: Do not continue in case of tcsetattr failure.
2013-08-19 Nicolas François <nicolas.francois@centraliens.net>
/* Set RAW mode */
termset_new = termset_save;
cfmakeraw (&termset_new);
- tcsetattr (STDIN_FILENO, TCSANOW, &termset_new);
+ if (tcsetattr (STDIN_FILENO, TCSANOW, &termset_new) != 0) {
+ /* FIXME: At least one change was successful.
+ * Success should be checked with tcsetattr */
+ fprintf (stderr,
+ _("%s: Cannot set terminal attributes: %s\n"),
+ Prog, strerror (errno));
+ caught = -1;
+ }
}
if (0 == caught) {