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
40
votes
7 answers

How do I set up a daemon with python-daemon?

I'm new to daemons so apologies if this is a newbie question. In several other answers (for example, this question) people suggested the python-daemon package was the way to go because it fully implements the PEP 3143 standard. Unfortunately,…
CQP
  • 937
  • 2
  • 11
  • 17
38
votes
5 answers

How can I launch a new process that is NOT a child of the original process?

(OSX 10.7) An application we use let us assign scripts to be called when certain activities occur within the application. I have assigned a bash script and it's being called, the problem is that what I need to do is to execute a few commands, wait…
Betty Crokker
  • 3,001
  • 6
  • 34
  • 68
36
votes
3 answers

How to convert a java program to daemon with jsvc?

I wrote a program and now I am expected to convert it to a daemon. Since I am a noob and dont know anything about it, can you please tell me how can I do it or can you please give me basic tutorials or readings about it ? I really want to learn how…
Ozer
  • 1,245
  • 4
  • 20
  • 27
36
votes
3 answers

Efficient Python Daemon

I was curious how you can run a python script in the background, repeating a task every 60 seconds. I know you can put something in the background using &, is that effeictive for this case? I was thinking of doing a loop, having it wait 60s and…
Kyle Hotchkiss
  • 10,754
  • 20
  • 56
  • 82
35
votes
4 answers

Docker deamon config path under mac os

I am using docker in Version 1.12.0 (build 10871) on Mac OS (El Capitan 10.11.4) and I want to provide a config file for the docker daemon. Under Ubuntu you place the config under /etc/default/docker (see docs). Unfortunately, I cannot figure out…
Erik
  • 2,888
  • 2
  • 18
  • 35
34
votes
2 answers

C# equivalent to Java's Thread.setDaemon?

How do I set a thread to a daemon thread in C#?
Epaga
  • 38,231
  • 58
  • 157
  • 245
33
votes
4 answers

How does the JVM terminate daemon threads? or How to write daemon threads that terminate gracefully

Hypothetical scenario: I have a daemon thread responsible for some I/O, the main thread finishes and returns, and the JVM decides to terminate my daemon thread. How does it do so? Interrupt? Finalize? How can I code my daemon thread so that it…
Aaron J Lang
  • 2,048
  • 3
  • 20
  • 27
33
votes
4 answers

Daemon and Service Difference

What is the difference between daemon and service ? (In windows or Linux).
vijay
  • 679
  • 2
  • 7
  • 15
32
votes
2 answers

The workers in ThreadPoolExecutor is not really daemon

The thing I cannot figure out is that although ThreadPoolExecutor uses daemon workers, they will still run even if main thread exit. I can provide a minimal example in python3.6.4: import concurrent.futures import time def fn(): while True: …
Sraw
  • 18,892
  • 11
  • 54
  • 87
32
votes
3 answers

How to spawn a new independent process in Python

I have a some Python code that occasionally needs to span a new process to run a shell script in a "fire and forget" manner, i.e. without blocking. The shell script will not communicate with the original Python code and will in fact probably…
Marc
  • 3,386
  • 8
  • 44
  • 68
31
votes
2 answers

Is it possible to set up MongoDB in a shared hosting environment?

I'm using GoDaddy and would like to use MongoDB for a pet project. I'm not sure it is possible though, since it has to be running the daemon, but, it doesn't hurt to ask, is there a way? EDIT: They've closed the question, but if anybody stumbles…
Francisco Noriega
  • 13,725
  • 11
  • 47
  • 72
30
votes
2 answers

run Mac Chrome with command line arguments as a background process

I have 2 aliases on my .bash_profile file containing: alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome" alias chromex="chrome --disable-web-security" but when running, it opens up Chrome but keeps holding the…
zanona
  • 12,345
  • 25
  • 86
  • 141
30
votes
9 answers

How to prevent Spring Boot daemon/server application from closing/shutting down immediately?

My Spring Boot application is not a web server, but it's a server using custom protocol (using Camel in this case). But Spring Boot immediately stops (gracefully) after started. How do I prevent this? I'd like the app to stop if Ctrl+C or…
Hendy Irawan
  • 20,498
  • 11
  • 103
  • 114
29
votes
2 answers

What should a Java program listen for, to be a good Linux service?

In Linux you can give the following commands: service start service stop As opposed to killing the process with kill -9 . As I learned in an earlier question, this is the difference between sending the…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
29
votes
2 answers

How to properly use log_daemon_msg, log_end_msg, log_progress_msg to write a proper daemon script?

I was suprised not to be able to find any documentation regarding the proper user of these functions: log_daemon_msg log_progress_msg log_end_msg log_action_msg log_success_msg log_failure_msg log_warning_msg Where can I find more information about…
sorin
  • 161,544
  • 178
  • 535
  • 806