write a program for every 10 seconds tell the number of users logged in .

6:47 PM

write a program for every 10 seconds tell the number of users logged in .

main()
{
  int pid;
pid=fork();
if (pid==0)
{
    for(;;)
{
  sleep(10);
printf(“ the number of users logged in are :”);
system(“who | wc –l”);
}
}
}

0 Comments