473,327 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

daemon under windows

I wrote a simple UNIX daemon (using 2 forks) which does a simple job: it
executes a function, waits for some time, and then executes it again. Now
I'd like to port that to Windows. How do I create daemon on Windows (since
I can't use fork)?

--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
Nov 14 '07 #1
1 5450
I wrote a simple UNIX daemon (using 2 forks) which does a simple job: it
executes a function, waits for some time, and then executes it again. Now
I'd like to port that to Windows. How do I create daemon on Windows (since
I can't use fork)?
On Windows, you develop "services". They are under the control of the
"service control manager", and can be managed through the "services"
control panel application, and the "net start/stop" command line
utility.

In that architecture, you don't need fork to start a background
process, but instead, you register your service with the system, and
it will get started automatically (if you wish so) or manually
(through the management interface).

You can use the Win32 extensions to create services, with the
win32serviceutil module.

HTH,
Martin
Nov 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rob Hunter | last post by:
Hi all. I want to run a Python daemon that manages a "to-do" queue. I want it so that the daemon is always running, where its running consists of looking at the queue to see if it has any jobs,...
3
by: bmgx | last post by:
This is what I am trying to find out, instruction on how to create a simple daemon on unix systems(Linux), can't find any info on usual sources..
1
by: Bob Swerdlow | last post by:
I've created a Python daemon that starts a bunch of BitTorrent downloader process. Everything is working fine when I start the daemon by hand (logged on as root). I can quit the session and see...
7
by: Michael Ransburg | last post by:
Hi! I have implemented a daemon in C++. It runs all the time, between reboots. Is there a way for other C++ classes to get a reference to the instance of this daemon class in order to call its...
4
by: cyshao | last post by:
Why Windows doesn't allow to launch daemon/service in command line ?? Unix/Linux can simply do that....
1
by: Stefan Neumann | last post by:
I have written a daemon which should run endlessly. The structure looks like this: - start-stop-daemon forks my python program then: if __name__=="__main__": try: main()
3
by: paul | last post by:
I am writing a daemon process that reads data from the serial port / dev/ttyS0. I am using pyserial & the method for setting up a daemon described in "Chris' Python Page"...
6
by: Johny | last post by:
Is it possible to run a Python program as daemon? Thanks
13
dmjpro
by: dmjpro | last post by:
class MainClass{ public static void main(String a){ //do something } } When i run this class file then JVM is the process having one main thread. Thread ends and process ends. I went...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.