// gcc killer.c -o killer #include #include #include #include #include #include int main(int argc, char **argv) { // avoid coredumping. struct rlimit core_limit; int res = getrlimit(RLIMIT_CORE, &core_limit); if ( 0 == res ) { core_limit.rlim_cur = 0; setrlimit(RLIMIT_CORE, &core_limit); } for ( int i = 1; i < argc; ++i ) { kill(getpid(), atoi(argv[i])); } return 0; }