Linux使用C语言重启系统

在Linux中使用C语言,执行system("reboot"),发现不起作用,此时应该使用Linux内置C语言库函数reboot(0X01234567),此函数需要包含头文件#include<unistd.h>和#include<sys/reboot.h>。

原文地址:https://www.cnblogs.com/Gregg/p/15192519.html