Skip to content

Instantly share code, notes, and snippets.

@richcollins
Created March 3, 2009 23:48
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 richcollins/73619 to your computer and use it in GitHub Desktop.
Save richcollins/73619 to your computer and use it in GitHub Desktop.
#include <unistd.h>
//some-daemon-process.c
int main(void)
{
daemon(1, 1);
while(1)
{
sleep(1);
}
return 0;
}
//ssh some-host.com ./some-daemon-process
//^^^ this doesn't exit ^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment