Ask a Question related to Ruby, Design and Development.
-
Phil Tomson #1
running background (daemon) processes in Windows
In Unix I can start a 'deamon' (background) process like:
ruby -e 'fork do system("something") end'
Or by putting the fork directly into my script:
fork do
#...do stuff...
end
That way if I log out of a shell session, for example, my process is still
running in the background.
But fork doesn't work under Windows (without cygwin) - is there a way to
do something similar under Windows?
Phil
Phil Tomson Guest
-
Execute all processes in the background from bash.
I was wondering if it's possible to prepend "time" and append "&" to all commands that I execute in bash. For example I'd like $ mozilla to... -
running processes from a service
hi everyone i am trying to write a program that runs a process when invoked (a program that reads data from a server and writes the output as XML... -
Long-running daemon acquiring giant memory footprint
I have written a long-running daemon in ruby to handle dynamic DNS updates. I have just recently moved it from ruby 1.6 to ruby 1.8 and updated all... -
Background processes inside the database.
I am looking for a way to have a session spawn a background process and release. The user needs to be able to start a job which could conceivably... -
Oracle background processes
gotta_know wrote: Not if you go through the trouble to make it work. Though anything you have written that deals with file permissions, etc.... -
Ernie #2
Re: running background (daemon) processes in Windows
"Phil Tomson" <ptkwt@aracnet.com> wrote in message
news:bn3v5g02hs@enews2.newsguy.com...You can use the start commad from the command line. eg.> In Unix I can start a 'deamon' (background) process like:
>
> ruby -e 'fork do system("something") end'
>
> Or by putting the fork directly into my script:
>
> fork do
> #...do stuff...
> end
>
> That way if I log out of a shell session, for example, my process is still
> running in the background.
>
> But fork doesn't work under Windows (without cygwin) - is there a way to
> do something similar under Windows?
>
> Phil
start "Messenger Object on 9500" /DD:\pubsub ruby messenger.rb
This will open up a new dos window with the program running
If you want it in the background rename you script to scriptname.rbw eg.
start "Messenger Object on 9500" /DD:\pubsub ruby messenger.rbw
This will start the process in the background.
Ernie
Ernie Guest
-
eg #3
Re: running background (daemon) processes in Windows
I'm not a unix guru, but I thought that a daemon process was more akin
to running as a "service" under windows.
If so, under windows there is a srvany.exe program on the windows 2000
resource kit that will enable you to running programs as services.
Alternatively, you can use a product called Firedaemon
([url]http://www.firedaemon.com/[/url]) to help.
E.
eg Guest



Reply With Quote

