[
https://issues.apache.org/jira/browse/HTRACE-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14283309#comment-14283309
]
Colin Patrick McCabe commented on HTRACE-83:
--------------------------------------------
So, a little background here:
In general, when you're running a daemon, you want it to do certain things.
You want to disassociate from the terminal, so that when you close your xterm,
your daemon won't go away. You want it to cd to /, so that the running daemon
won't prevent you from unmounting filesystems that you had mounted when you ran
the startup script. And you want to start a new "controlling session" so that
your daemon won't get signals sent to your shell.
This is "hadoop-style" startup script that just allows start/stop/status
functionality. It's configured via environment variables-- again, like Hadoop.
The "ideal" way to do all this is to integrate with something like systemd.
systemd doesn't require writing a bash script-- you just write a simple little
"service file" and systemd handles process setup and daemonization.
Unfortunately, not all Linux distributions support systemd yet. Older Ubuntus
certainly don't. And MacOS and the BSDs probably never will support systemd.
So this script will be helpful for those scenarios.
> add script for running htraced as a daemon
> ------------------------------------------
>
> Key: HTRACE-83
> URL: https://issues.apache.org/jira/browse/HTRACE-83
> Project: HTrace
> Issue Type: Improvement
> Affects Versions: 3.2.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-83.001.patch
>
>
> add a simple script for running htraced as a daemon
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)