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
1 answer

what is the win32 alternative to the Unix daemon() subroutine?

I have to call several (> 10) .exe command line programs in the background. Creating a Windows Services doesn't sound very appealling in this context - c'mon, that's a bit overpowered for such a simple task. Is there anything like a daemon(3)…
niels
  • 75
  • 1
  • 4
1
vote
0 answers

How to start a python-daemon over ssh connection?

I want to log into a remote computer using the python library paramiko, then start a daemon process using the python-daemon library which, after the programm terminates, is still working as some kind of job queue. This is my code so far: (in this…
jrsm
  • 1,595
  • 2
  • 18
  • 39
1
vote
2 answers

open() returns error when daemonized

In my case I'm trying to write to frame buffer /dev/fb1. As soon as I daemonize the program I get no valid file descriptor. I tried it with a regular file (with correct permissions) - same result. When I comment out daemonize(); everything runs…
awado
  • 207
  • 3
  • 10
1
vote
2 answers

Running a C program executable in a server with LAMP - what modifications to the C code?

I am planning on putting the executable of a C program in a server and running it using a PHP script - as a Web API: e.g. echo exec("myscript.exe") Currently the myscript runs on command prompt - it takes two input files and return an integer or…
1
vote
0 answers

Python Daemonizer - Fork a Process

I am reading this Python book that shows a couple of scripts to create my own daemon. When I run the code it does absolutely nothing however. #! /usr/bin/env python import sys, os def daemonize(stdin='/dev/null', stdout='/dev/null', …
user_loser
  • 881
  • 1
  • 13
  • 27
1
vote
1 answer

Daemon to check the status of a 3D Printer across the network (idle/printing)

I would like to develop a little daemon software that will be run on a Windows computer. I am trying to know if a 3D printer connected through the network (TCP/IP assigned through DHCP) is currently printing, or is it idle. I believe the fact that…
jhagege
  • 1,486
  • 3
  • 22
  • 36
1
vote
1 answer

Cocoa Launch agent registering itself after installation

I have created Cocoa app which is type of launch agent. To distribute this I have created package as well which installs the app and copies the launchagnet plist file in /Libraries/LaunchAgents. Now the problem is after installation i want this app…
Unicorn
  • 2,382
  • 6
  • 29
  • 42
1
vote
2 answers

Integrating Incoming Email Into a php/mysql App

I am looking to create an incoming email daemon switchboard that I can integrate with various remote php/mysql apps. Ideally I want to check the 'to' address to see if it is in a mysql database and if it is, have the email parsed and posted via CURL…
phirschybar
  • 8,357
  • 12
  • 50
  • 66
1
vote
2 answers

create a daemon in c that runs in the background but does not perform its task until I request it to

I need to create a daemon in c that runs in the background but does not perform its task until I request it to. Just for an example; I have created a daemon that when run will perform a du -h --max depth=3 command on /home and output it to a file.…
1
vote
0 answers

Android SocketClient::sendMsg(int code, const char *msg, bool addErrno) doesn't appear to do anything if the msg parameter is an empty string

I'm trying to send a response from a daemon back to my service, and all works fine if I call the SocketClient::sendMsg(int code, const char *msg, bool addErrno) function passed into my FrameworkCommand::runCommand() implementation with a non-empty…
lane
  • 633
  • 12
  • 18
1
vote
1 answer

Industry standard for running daemonized Erlang/OTP applications?

Some of modern infrastructure components such as Yaws and CouchDB can be installed on Ubuntu with sudo apt-get install and then they can be started with {service_name} start or simply {service_name} I wonder if there are any differences between…
skanatek
  • 5,133
  • 3
  • 47
  • 75
1
vote
1 answer

Failed to connect to SafariDriver. Selenium 2.44.0 run via a daemon on OSX Yosemite & Safari 8

Im currently on Yosemite and Safari 8. I keep getting this error: Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Failed to connect to SafariDriver after 10161 ms Build info: version: '2.44.0', revision: '76d78cf', time:…
BNK
  • 91
  • 2
  • 6
1
vote
1 answer

How can I write a simple HTTP proxy in Perl?

I don't want to use the HTTP::Proxy package because I want to dump out a couple requests. My one liner looks like this, but breaks on trying to pass the header in: perl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -MLWP::UserAgent -e 'my $ua =…
dlamblin
  • 43,965
  • 20
  • 101
  • 140
1
vote
1 answer

chef service start_command not working

I'm trying to launch a node process as a service using forever, but the configuration is not working correctly. What's wrong with it? execute "npm install -g forever" restart_command_string = "forever restart…
lostinplace
  • 1,538
  • 3
  • 14
  • 38
1
vote
1 answer

How to remove a script included with require after use in PHP?

I'm working with infinite cycles(daemons). Which include the same script for each iteration, the scripts are included with require function. I have a problem, scripts are magnified by each iteration, How could remove the script included after each…