diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -8,8 +8,8 @@ #include "consts.h" #include "config.h" -extern int light_thread(pid_t _keypress_pid); -extern int keypress_thread(pid_t _light_pid); +extern void light_thread(void); +extern void keypress_thread(pid_t _light_pid); struct timeval* last_press; @@ -34,8 +34,10 @@ int main(int argc, const char* argv[]) { setup(); pid_t keypress_pid = getpid(); - pid_t pid = fork(); + pid_t light_pid = fork(); - if (pid == 0) return light_thread(keypress_pid); - else return keypress_thread(/*light_*/pid); + if (light_pid == 0) light_thread(); + else keypress_thread(light_pid); + + return -1; } |
