{ "info": { "author": "Yoshida Shin", "author_email": "wbcchsyn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "unix_daemon\n===========\n| unix_daemon is a python module emulating BSD daemon(3).\n| This module provides a function named daemon.\n| If this function is called, the process become a daemon and start to run\n| background.\n\n\nRequirements\n^^^^^^^^^^^^\n* Python 2.6 or later, or Python 3.x\n* Unix or Linux platform.\n\nTest\n^^^^\n* Python 2.6.9\n* Python 2.7.8\n* Python 3.1.5\n* Python 3.2.5\n* Python 3.3.5\n* Python 3.4.1\n\nSetup\n^^^^^\n* Install using pip\n ::\n\n $ sudo pip install unix_daemon\n\n* Install from git.\n ::\n\n $ git clone https://github.com/wbcchsyn/unix_daemon.git\n $ cd unix_daemon\n $ sudo python setup.py install\n\nUsage\n^^^^^\nunix_daemon.daemon(nochdir=False, noclose=False)\n------------------------------------------------\nMake process daemon and start to run in the background.\n\n Arguments\n | If argument 1 'nochdir' is False, the process changes the calling\n | process's current working directory to the root directory (\"/\");\n | otherwise, the current working directory is left unchanged.\n | The default value of the nochdir is False.\n\n | If argument 2 'noclose' is False, this function close file descriptors 0,\n | 1 and 2 and redirect them to /dev/null. Even if some of them have been\n | closed, this function open these file descriptors and redirect to\n | /dev/null if noclose is False.\n | The defult value of noclose is False.\n\n Return Value\n daemon returns the pid of new process.\n\n Note\n | This function calls os.fork() internally to detach tty safely.\n | Be careful to call this function when two or more than two python threads\n | are running.\n\n | Normary, file descriptors 0, 1 and 2 are correspond to stdin, stdout and\n | stderr. However, even if any of these file discriptors refer to something\n | else, they will still be closed when argument 'noclose' is False.\n\n | It is a good idea to call this function before creating any threads and\n | before opening any files or sockets.\n\n Example\n Call unix_daemon.daemon(), then the process starts to run in the backgrond.\n\n ::\n\n import unix_daemon\n import os\n\n print('pid: %s\\n' % os.getpid())\n\n pid = unix_daemon.daemon()\n with open('/tmp/foo', 'a') as f:\n print('pid: %s\\n' % os.getpid())\n f.write('new pid: %s\\n' % pid)\n\n You can see the process id changes and the 2nd print is not displayed.\n\nDevelopment\n^^^^^^^^^^^\n\nInstall requirements to developing copy pre-commit hook from repository.\n\n::\n\n $ git clone https://github.com/wbcchsyn/unix_daemon.git\n $ cd unix_daemon\n $ pip install -r dev_utils/requirements.txt\n $ ln -s ../../dev_utils/pre-commit .git/hooks/pre-commit", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wbcchsyn/unix_daemon", "keywords": null, "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "unix_daemon", "package_url": "https://pypi.org/project/unix_daemon/", "platform": "linux,unix", "project_url": "https://pypi.org/project/unix_daemon/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/wbcchsyn/unix_daemon" }, "release_url": "https://pypi.org/project/unix_daemon/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Function emulating Daemon(3) on Linux and Unix OS.", "version": "1.0.0" }, "last_serial": 1154916, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5236cb67c45531d520de2f9490d3e13a", "sha256": "a80317db279194da0104298380d6dfb5f94f7e3090d475431c0c507adb3be78c" }, "downloads": -1, "filename": "unix_daemon-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "5236cb67c45531d520de2f9490d3e13a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4323, "upload_time": "2013-11-02T18:14:38", "url": "https://files.pythonhosted.org/packages/f2/2d/8a3a9db8a1b49b0108c2ab93265724742624213aefde7e02dab32a85afe1/unix_daemon-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4dad61143e5dca1aeecb642fc0fa2549", "sha256": "92c5d1dbf7110f7bab02ef69d1d799cfd02b189d7c46d43138d51f078d233ec8" }, "downloads": -1, "filename": "unix_daemon-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4dad61143e5dca1aeecb642fc0fa2549", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3031, "upload_time": "2013-11-02T18:14:35", "url": "https://files.pythonhosted.org/packages/fa/92/5e87fb5c222ff3e57c60f98538288dd1503b8ec27b5549727ab0880b3e8a/unix_daemon-0.1.0.tar.gz" } ], "0.1.1": [], "0.1.3": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "b133270e1692edfa29a62abebb428a8a", "sha256": "9606b6732dad424b3af7be9b7e789bf52d3e37c6fa22105b3075e2d2c977c266" }, "downloads": -1, "filename": "unix_daemon-0.1.3.macosx-10.9-intel.tar.gz", "has_sig": false, "md5_digest": "b133270e1692edfa29a62abebb428a8a", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 3301, "upload_time": "2014-03-17T13:26:28", "url": "https://files.pythonhosted.org/packages/35/c0/05ca63af1162550e869ae804bec9d8184ad008cd4632cd189788c0a00a15/unix_daemon-0.1.3.macosx-10.9-intel.tar.gz" }, { "comment_text": "", "digests": { "md5": "25d7ffb516149df966f61468e7702b35", "sha256": "848efe8aef61191306e109070e45b251a111c9f38b868b0bebed918e42a6290d" }, "downloads": -1, "filename": "unix_daemon-0.1.3-py2.7.egg", "has_sig": false, "md5_digest": "25d7ffb516149df966f61468e7702b35", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4563, "upload_time": "2014-03-17T13:26:30", "url": "https://files.pythonhosted.org/packages/27/ff/dd738a4f195dfb1dd28a37400926a2f14e9f7ce092e208ce64be9a648183/unix_daemon-0.1.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "5b180acd9ad42299269a58147c51c5b5", "sha256": "b17825aeca798d3cfbbc4de0d8bfd50b6c40c48f1a396521e82a6f0efbc3bb2e" }, "downloads": -1, "filename": "unix_daemon-0.1.3.tar.gz", "has_sig": false, "md5_digest": "5b180acd9ad42299269a58147c51c5b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3271, "upload_time": "2014-03-17T13:26:26", "url": "https://files.pythonhosted.org/packages/88/94/4a82becda8b854ee7f4a7ae49be7997136e4fc2cc3a0fb79107ab261db58/unix_daemon-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "548cfb7dbb69539d32d9ede64de4411b", "sha256": "fc45b7494a9e19f4e88d60a23b023558e1b6130e9106bf08ef7bfa22ab82cc75" }, "downloads": -1, "filename": "unix_daemon-0.1.4.tar.gz", "has_sig": false, "md5_digest": "548cfb7dbb69539d32d9ede64de4411b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3367, "upload_time": "2014-03-25T14:21:25", "url": "https://files.pythonhosted.org/packages/26/c8/35a21819c67106a955b17bbf81af787190f66bc3e432982a643e0813028c/unix_daemon-0.1.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "0fa1785b1674c525e0e5b2206b1d3844", "sha256": "a34c4ca03cfac914a768d1b4047d9c756a674cadbb3c622a1e86951fef560d51" }, "downloads": -1, "filename": "unix_daemon-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0fa1785b1674c525e0e5b2206b1d3844", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3493, "upload_time": "2014-07-11T15:55:31", "url": "https://files.pythonhosted.org/packages/09/e0/5298090b410017276bbb7b0b3e71f8ed7460501f527a35f2201105b8216b/unix_daemon-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fa1785b1674c525e0e5b2206b1d3844", "sha256": "a34c4ca03cfac914a768d1b4047d9c756a674cadbb3c622a1e86951fef560d51" }, "downloads": -1, "filename": "unix_daemon-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0fa1785b1674c525e0e5b2206b1d3844", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3493, "upload_time": "2014-07-11T15:55:31", "url": "https://files.pythonhosted.org/packages/09/e0/5298090b410017276bbb7b0b3e71f8ed7460501f527a35f2201105b8216b/unix_daemon-1.0.0.tar.gz" } ] }