aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 5c57bbf..f41ccfb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}