C Program for shutting down the Operating System

#include<stdio.h>
#include<stdlib.h>
int main()
{
//for linux based systems
system("sudo init 0"); //system executes a  shell command.
//for windows
       //system("shutdown -s");
return 0;


}

Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto