#include <stdio.h>
#include <unistd.h>
#include <sys/reboot.h>
int
main(int argc,char **argv)
{
printf("Content-type: text/html; charset=utf-8/n/n");
printf("The system is goging to reboot ......./n");
fflush(stdout);
sync();
reboot(RB_AUTOBOOT);
return 0;
}
gcc -o myreboot.cgi myreboot.c
chmod +s myreboot.cgi