By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

daemon under windows

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.