Skip to content

Instantly share code, notes, and snippets.

@lloyd
Created August 27, 2009 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloyd/176632 to your computer and use it in GitHub Desktop.
Save lloyd/176632 to your computer and use it in GitHub Desktop.
#include <signal.h>
#include <stdio.h>
int
main(void)
{
pid_t p = getpid();
printf("stopping process, to attach - gdb <path_to_binary> %d\n", p);
kill(getpid(), SIGSTOP);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment