系统重启

  1. [zcm@c #17]$cat r.c  
  2. #include <sys/reboot.h>  
  3.   
  4. int main( void )  
  5. {  
  6.         puts("reboot now");  
  7.         reboot(RB_AUTOBOOT);  
  8.   
  9.         return 0;  
  10. }  
  11. [zcm@c #18]$make  
  12. gcc -g -o r r.c   
  13. [zcm@c #19]$  
原文地址:https://www.cnblogs.com/lvdongjie/p/4153194.html