Re: Escape sequences & console

From: H. Peter Anvin (hpa@zytor.com)
Date: Mon Mar 05 2001 - 12:20:29 EST


Followup to: <Pine.LNX.4.31.0103022208050.30419-100000@phobos.fachschaften.tu-muenchen.de>
By author: Simon Richter <Simon.Richter@phobos.fachschaften.tu-muenchen.de>
In newsgroup: linux.dev.kernel
>
> From the source of the chvt program:
>
> if (ioctl(fd,VT_ACTIVATE,num)) {
> perror("chvt: VT_ACTIVATE");
> exit(1);
> }
> if (ioctl(fd,VT_WAITACTIVE,num)) {
> perror("VT_WAITACTIVE");
> exit(1);
> }
>
> Where fd is /dev/tty, /dev/tty0, /dev/console or std{in,out,err} (From the
> source, I doubt this ioctl works on all of those).
>

/dev/tty0 would be the correct device (tty0 = current virtual
console.)

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:17 EST