#include <assert.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <linux/unistd.h>
+#include <unistd.h>
#include <limits.h>
#include <string.h>
#include <pthread.h>
+#include <sys/syscall.h>
#include "debugger.h"
#include "debugger.c"
-_syscall2(int, tkill, int, tid, int, sig)
-int tkill(int tid, int sig);
+#define tkill(tid, sig) syscall (SYS_tkill, (tid), (sig))
static int attach_checked (pid_t pid, int redelivered_expect)
struct registry *iter;
for (iter = registry_list; iter != NULL; iter = iter->next)
- kill (iter->pid, SIGKILL);
+ {
+ tkill (iter->pid, SIGCONT);
+ tkill (iter->pid, SIGKILL);
+ kill (iter->pid, SIGKILL);
+ }
}
static void registry_cleanup (void)