Skip to content

Instantly share code, notes, and snippets.

@vsrinivas
Created January 29, 2013 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsrinivas/4667432 to your computer and use it in GitHub Desktop.
Save vsrinivas/4667432 to your computer and use it in GitHub Desktop.
#include <sys/types.h>
#include <sys/consio.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <fcntl.h>
main() {
int fd;
int rc;
fd = open("/dev/console", O_RDWR);
rc = ioctl(fd, VT_WAITACTIVE, 9);
close(fd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment