日期:2014-05-16 浏览次数:20588 次
int main(void)
{
sleep(3600);
system("shutdown -h now");
return 0;
}
#include <unistd.h>
int main(void)
{
pid_t pid = fork();
if (pid!=0){
int st;
wait(&st);
exit(0);
}
pid = fork();
if (pid != 0){
exit(0);
}
sleep(3600);
system("shutdown -h now");
return 0;
}