Questions tagged [daemon]

A daemon is a process or program that runs in the background (i.e. requiring no user interaction).

Daemon processes are background programs found in Linux/Unix systems that are typically started during the booting sequence. They perform special management and utility functions, which may either perform consistent tasks like polling (i.e. the syslogd daemon) or wait for a command to do something (like handling setup of new SSH connections via the sshd daemon).

They can be initiated after start time using the systemctl command:

$systemctl start daemon.service

Some commonly used daemons include:

  • httpd (HTTP web server management)
  • mountd (Mounting of file systems)
  • nfsd (Sharing of network files)
  • routed (Management of routing tables)
  • ntpd (Network time protocol administering)
  • dhcpd (Dynamic host configuration protocol administering)
2634 questions
1
vote
2 answers

running a php script as a daemon

I have a program the is used to provision a VPS via API. The core part of the script will keep hitting the API (every 5 second, 15 times) till the API spits back an IP address. It takes about 30 sec to execute. There is no error in the code and the…
NIX
  • 107
  • 3
  • 14
1
vote
1 answer

raspbian custom daemon start manually but not on boot

I have created a python script. I set in as a daemon. When I start manually, it works fine : service testMotor start it works well ! Cool. Then I wanted to make it works on startup. I follow the tips given here. So I used : update-rc.d…
vlandru
  • 21
  • 1
1
vote
0 answers

Buildbot fails when running as a daemon on mac osx 10.8

I've set up a buildslave to manage mac osx builds on a small apple computer in my room. Everything installed smoothly and before I knew it my apple server began churning away at its first few builds with no problems at all. Seeing as everything…
TheComet
  • 31
  • 4
1
vote
1 answer

How to start a process as running in background?

I've done a fork and and then an exec but I don't know how to start it in the background. Should I use an argument after the exec? If so, which is it?
Pino
  • 619
  • 1
  • 8
  • 25
1
vote
2 answers

queque system that manages load

I need a queque system that runs as fast as possible but doesn't slow down the server. I have a web app (php) that converts different pieces of media (photos,video,etc). When someone wants to convert a file the command to convert goes into a…
Keith
  • 11
  • 1
1
vote
1 answer

Keeping a long running (forever) php CLI process running on Windows

I have written a script that runs on a windows machine doing various tasks in a loop. It works great, except it exists, for no apparent reason every two hours. I have used: set_time_limit(0); to ensure the script should keep running forever. The…
John Hunt
  • 4,265
  • 8
  • 45
  • 59
1
vote
1 answer

sinatra start as daemon programmatically

Right now, after having loaded everything my executable runs my app like this: Rack::Handler::pick(['puma']).run VCK::App and it works, but it blocks the terminal (which is ok for development) How do I get this to start as a daemon programmatically…
Thermatix
  • 2,757
  • 21
  • 51
1
vote
1 answer

HTML call that triggers daemon subprocess

I am trying to define a program to receive an HTML request to trigger a process in my server and leave it running there, as a daemon, until another HTML call tells the server to kill it. My problem is leaving the daemon running after a proper HTML…
Alex
  • 306
  • 2
  • 9
1
vote
1 answer

How did I log stdout after daemonize?

I successfully daemonize my python code by using Sander Marechal's code sample. Now I want to log stdout to logfile but failed. How did I log stdout after daemonize? Here is my code: #!/usr/bin/env python # -*- coding: utf-8 -*- import zerorpc,…
Gaspar Cheng
  • 1,145
  • 1
  • 10
  • 14
1
vote
0 answers

Difference between running ElasticSearch as daemon process and using Java Service Wrapper

I'm working with multiple instances of ElasticSearch installed on a single Ubuntu 14.04 server (using different ports for development purposes), and I was beginning to set up Java Service Wrapper with each one so I can control each instance…
mr.adam
  • 241
  • 2
  • 12
1
vote
1 answer

Does main() get paused during signal handling?

I'm developing a POSIX daemon which reads from a database from time to time. I'd like to close the connection when SIGTERM arrives (e.g. when the system shuts down). When the signal handler is called, is the main() paused until the handler finishes…
1
vote
1 answer

Best way to launch applications from a bash script?

I'm writing a simple menu using the dialog utility in a bash script. The idea is that the menu script will run in a screen session which I can connect to over SSH (or whatever else). I want to then use the menu to start/stop applications running on…
Cameron Ball
  • 4,048
  • 6
  • 25
  • 34
1
vote
1 answer

modifying python daemon script, stop does not work

I'm trying to modify this example using some input from here as I want only to stop the specific Python app running as a daemon because there will be others as well on the same server running on Python so don't want kill all python scripts... The…
Kostas
  • 367
  • 1
  • 3
  • 17
1
vote
2 answers

Celery Daemon does not work on Centos 7

I am trying to run celery daemon on Centos 7 which has systemd / systemctl. It is not working. I tried a non-daemon case and it worked I ran ~mytask and that freezes up on the client machine and on the server where the celery daemon is running I…
max
  • 9,708
  • 15
  • 89
  • 144
1
vote
0 answers

Fork and init startup

I was reading some papers regarding how forking work in linux and why is it needed to call fork to create daemon and why the parent should exit so the init can take control of newly created process and send it to background But this all is in case…
Amir
  • 194
  • 1
  • 7