622
Hell yeah (ani.social)
you are viewing a single comment's thread
view the rest of the comments
[-] ChaosMonkey@lemmy.dbzer0.com 1 points 2 days ago
[-] Sonotsugipaa@lemmy.dbzer0.com 6 points 1 day ago

The cruelest part is not formatting it correctly :c

#include <sys/types.h>
#include <signal.h>
#include <unistd.h>

int main() {
    pid_t pid = fork();
    if (pid == 0) {
        // Child process
        while (1);
    } else {
        // Parent process
        sleep(2);
        kill(pid, SIGKILL);  // Force kill child
        printf("Child process killed.\n");
    }
    return 0;
}
this post was submitted on 18 Mar 2026
622 points (99.2% liked)

Programmer Humor

30494 readers
3086 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS