From e61da07522a060da98fa3a56db3d0360469b26cf Mon Sep 17 00:00:00 2001 From: auric <104602845+ihateamongus@users.noreply.github.com> Date: Mon, 8 Sep 2025 21:19:14 -0500 Subject: organize repository layout --- .../breathing-exo-daemon/display/display-shm.c | 40 ---------------------- 1 file changed, 40 deletions(-) delete mode 100644 oldresources/breathing-exo-daemon/display/display-shm.c (limited to 'oldresources/breathing-exo-daemon/display/display-shm.c') diff --git a/oldresources/breathing-exo-daemon/display/display-shm.c b/oldresources/breathing-exo-daemon/display/display-shm.c deleted file mode 100644 index 435077a..0000000 --- a/oldresources/breathing-exo-daemon/display/display-shm.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#define SHM_NAME "/breathing_color_shm" // Shared memory name (same as in exo.c) -#define COLOR_SIZE 8 // Size for one color (e.g., #RRGGBB) - -int main() { - int shm_fd; - char *shm_ptr; - - // Open shared memory object - shm_fd = shm_open(SHM_NAME, O_RDONLY, 0666); - if (shm_fd == -1) { - perror("Failed to open shared memory"); - return 1; - } - - // Map shared memory into the process's address space - shm_ptr = mmap(NULL, COLOR_SIZE, PROT_READ, MAP_SHARED, shm_fd, 0); - if (shm_ptr == MAP_FAILED) { - perror("Failed to map shared memory"); - close(shm_fd); - return 1; - } - - // Read the color from shared memory and print it - printf("Breathing color: %s\n", shm_ptr); - - // Clean up - munmap(shm_ptr, COLOR_SIZE); - close(shm_fd); - - return 0; -} - -- cgit v1.2.3