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
61
votes
21 answers

Android Studio: Unable to start the daemon process

I'm facing the below error when I'm trying to import a gradle project in Android Studio. Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is…
buggydroid
  • 1,870
  • 6
  • 25
  • 36
59
votes
5 answers

Reference for proper handling of PID file on Unix

Where can I find a well-respected reference that details the proper handling of PID files on Unix? On Unix operating systems, it is common practice to “lock” a program (often a daemon) by use of a special lock file: the PID file. This is a file in a…
bignose
  • 30,281
  • 14
  • 77
  • 110
58
votes
5 answers

Couldn't connect to Docker daemon on Mac OS X

I would like to run multi-container application using docker-compose on Mac OS X El Capitan (v10.11.2). However, the command $ docker-compose up command complains that it can't connect to the Docker daemon. ERROR: Couldn't connect to Docker daemon…
ndequeker
  • 7,932
  • 7
  • 61
  • 93
53
votes
8 answers

Communicating with a running python daemon

I wrote a small Python application that runs as a daemon. It utilizes threading and queues. I'm looking for general approaches to altering this application so that I can communicate with it while it's running. Mostly I'd like to be able to monitor…
hanksims
  • 1,479
  • 2
  • 12
  • 22
52
votes
7 answers

How do I code a Mono Daemon

I'm trying to write a Mono C# daemon for linux. I'd like to do a starts and stops of it when its done processing instead of just killing the process. Does anyone have any examples of this? Edit: I figured out how to use start-stop-daemon…
Scott Cowan
  • 2,652
  • 7
  • 29
  • 45
52
votes
6 answers

How do I get my Golang web server to run in the background?

I have recently completed the Wiki web development tutorial (http://golang.org/doc/articles/wiki/). I had tons of fun and I would like to experiment more with the net/http package. However, I noticed that when I run the wiki from a console, the wiki…
quakkels
  • 11,676
  • 24
  • 92
  • 149
51
votes
12 answers

Docker: Are you trying to connect to a TLS-enabled daemon without TLS?

On Linux Mint 17.1 x86_64 with kernel 3.13.0-48-generic and OpenSSL version 1.0.1f-1ubuntu2.11; whenever I try to execute any docker command (like docker login or docker run hello-world), I get the following error: FATA[0000] Get…
strNOcat
  • 913
  • 2
  • 8
  • 22
50
votes
6 answers

Linux daemonize

I am writing a Linux daemon . I found two ways to do it. Daemonize your process by calling fork() and setting sid. Running your program with &. Which is the right way to do it?
Sirish
  • 9,183
  • 22
  • 72
  • 107
49
votes
1 answer

How to deal with Mac OS X Helper/Main app architecture regarding core data, shared preferences and notifications?

I'm having some architectural doubts about a project (Mac OS X app) I'm working on. It basically consists of two elements: a daemon that runs in the background gathering some data and a viewer used to represent the gathered data. The daemon should…
Niels Mouthaan
  • 1,010
  • 8
  • 19
46
votes
2 answers

Killing gracefully a .NET Core daemon running on Linux

I created a .NET Core console application running as a daemon on a Ubuntu 14.04 machine. I want to stop the service without forcing it, being able to handle a kill event. How can I achieve this?
user4388177
  • 2,433
  • 3
  • 16
  • 30
44
votes
3 answers

Daemon vs Upstart for python script

I have written a module in Python and want it to run continuously once started and need to stop it when I need to update other modules. I will likely be using monit to restart it, if module has crashed or is otherwise not running. I was going…
maaz
  • 4,371
  • 2
  • 30
  • 48
41
votes
3 answers

How do I run long term (infinite) Python processes?

I've recently started experimenting with using Python for web development. So far I've had some success using Apache with mod_wsgi and the Django web framework for Python 2.7. However I have run into some issues with having processes constantly…
Hubro
  • 56,214
  • 69
  • 228
  • 381
41
votes
3 answers

Cannot find the daemon.json file in windows 10 after docker-desktop installation

I installed the docker-desktop in windows 10 using the installer. Now i want to see the configuration file daemon.json. The official documentation says that The default location of the configuration file on Windows is…
AnjK
  • 2,887
  • 7
  • 37
  • 64
41
votes
2 answers

Cross-platform background service in .NET Core (think windows service/unix daemon)?

So I have an app that is composed from an API and a Windows service (wrapped by Topshelf) that is continuously listening for events using RabbitMQ and processes data on demand. For education and fun, I'm trying to rewrite this into an equivalent…
valorl
  • 1,499
  • 2
  • 14
  • 30
40
votes
1 answer

What is the minUptime

I am using forever with my project. What do these options do: minUptime spinSleepTime I didn't understand from GitHub page.
Tolgay Toklar
  • 4,151
  • 8
  • 43
  • 73