diff options
| author | spv <spv@spv.sh> | 2025-09-24 18:42:02 -0400 |
|---|---|---|
| committer | spv <spv@spv.sh> | 2025-09-24 18:42:02 -0400 |
| commit | 7421749f450d9845574a64476a7bebbf8555e8d7 (patch) | |
| tree | b6b907daa22c6683f23ebeb1f0c1f3e3407ce4ea /src/main.c | |
| parent | e87085400d4a46793ee4f21ea8591c0f65813ba6 (diff) | |
refactor, change timeout to 5s
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; } |
