Search:

Type: Posts; User: wiraredi

Search: Search took 0.00 seconds.

  1. while(1) { sleep(10); if(kbhit()) ...

    while(1)
    {
    sleep(10);
    if(kbhit())
    printf("you press keyboard");
    }

    i try to know wheter the kbhit() working or not by do that, but after i compile it then i type something in...
  2. Replies
    11
    Views
    250,273

    #include #include #include...

    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <termios.h>
    #include <unistd.h>
    #include <fcntl.h>

    int kbhit(void)
    {
    struct termios oldt, newt;
  3. while(1) { if(kbhit()) { ...

    while(1)
    {
    if(kbhit())
    {
    exit(0);
    }
    }

    and it is could not stop the child process, how do i make the child process exit ??
  4. i want to make a daemon process that could stop...

    i want to make a daemon process that could stop if user hit the keyboard, but the kbhit routine doesnt work when it is in the daemon process, would you help please?
  5. what if i want to run kbhit in background process like this, why not work proprely

    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <termios.h>
    #include <unistd.h>
    #include <fcntl.h>

    int kbhit(void)
    {
    struct termios oldt, newt;
Results 1 to 5 of 5