Skip to content

Instantly share code, notes, and snippets.

View Fansion's full-sized avatar

Frankie Fu Fansion

  • Tencent
  • ShenZhen, GuangDong, China
View GitHub Profile
@Fansion
Fansion / daemon.md
Created December 18, 2016 13:55 — forked from andreif/daemon.md
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

#include <iostream>
using namespace std;
int main()
{
cout << "hello world!" << endl;
return 0;
}