Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 5 Mar 2001 12:21:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 5 Mar 2001 12:20:55 -0500 Received: from neon-gw.transmeta.com ([209.10.217.66]:55566 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Mon, 5 Mar 2001 12:20:44 -0500 To: linux-kernel@vger.kernel.org From: "H. Peter Anvin" Subject: Re: Escape sequences & console Date: 5 Mar 2001 09:20:29 -0800 Organization: Transmeta Corporation, Santa Clara CA Message-ID: <980hst$8ln$1@cesium.transmeta.com> In-Reply-To: <"3a9ea6fa3b646cc9@citronier.wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Disclaimer: Not speaking for Transmeta in any way, shape, or form. Copyright: Copyright 2001 H. Peter Anvin - All Rights Reserved Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Followup to: By author: Simon Richter 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 -- at work, 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/