Skip to content

Instantly share code, notes, and snippets.

View salekseev's full-sized avatar

Stas Alekseev salekseev

View GitHub Profile
@salekseev
salekseev / killparent.c
Created October 16, 2015 18:55 — forked from xylifyx2/killparent.c
Use in -XX:OnOutOfMemoryError="killparent"
#include <stdio.h>
#include <unistd.h>
int main()
{
printf ("kill -9 <parent>\n");
kill (getppid(), 9);
}
#!/usr/bin/env python
import msgpack
import sys
try:
while True:
line = sys.stdin.readline().strip('\n')
try:
print msgpack.unpackb(line)