Signed-off-by: Alexey Gladkov <legion@altlinux.org>
_exit (1);
}
+ if (ioctl(fd1, TIOCSCTTY, (char *)1)) {
+ perror("ioctl TIOCSCTTY");
+ fflush(stderr);
+ _exit (1);
+ }
+
/* slight problem: after "openvt -su" has finished, the
utmp entry is not removed */
if(as_user)
* do not matter. But setfont:activatemap() does a write.
*/
fd = open(fnam, O_RDWR);
- if (fd < 0 && errno == EACCES)
+ if (fd < 0)
fd = open(fnam, O_WRONLY);
- if (fd < 0 && errno == EACCES)
+ if (fd < 0)
fd = open(fnam, O_RDONLY);
if (fd < 0)
return -1;