uawdijnntqw1x1x1
IP : 216.73.216.155
Hostname : vm5018.vps.agava.net
Kernel : Linux vm5018.vps.agava.net 3.10.0-1127.8.2.vz7.151.14 #1 SMP Tue Jun 9 12:58:54 MSK 2020 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
var
/
..
/
usr
/
share
/
doc
/
perl-base
/
..
/
console-tools
/
examples
/
spawn_console.c
/
/
/* * Tiny test program for the `spawn console' key * (should not use signal; should not use sleep) * aeb - 941025 * * Note: this functionality has become part of init. * * Note: open(1) is now part of the `open' Debian package. * * You should not use it on a system; if you want to do this, * be very careful. * * If you have this in /etc/rc.local you should * start getty, not open, or anybody will have a root shell * with a single keystroke. */ #include <signal.h> #include <stdlib.h> /* system */ #include <fcntl.h> /* open */ #include <unistd.h> /* sleep */ #include <sys/ioctl.h> /* ioctl */ #include <linux/kd.h> void sighup(){ system("open -s -l bash"); signal(SIGHUP, sighup); } void main(){ int fd; fd = open("/dev/console", 0); if (fd < 0) fd = 0; signal(SIGHUP, sighup); ioctl(fd, KDSIGACCEPT, (long) SIGHUP); while(1) sleep(3600); }
/var/../usr/share/doc/perl-base/../console-tools/examples/spawn_console.c