Re: daemons

Hello, Phy,

Maybe I have missed something, but couldn’t you just put the entire
process in the background instead of forking it?

Something like:
jruby scaleMatrix.rb &

or doing it with nohup?

Cheers,
Chiaming H.

----- Original Message ----
From: Phy P. [email protected]
To: [email protected]
Sent: Monday, October 20, 2008 1:31:26 PM
Subject: Re: [jruby-user] daemons

Jacob,

That’s a good idea and in fact, I have tried unsuccessfully to have an
external jruby wrapper invoke the scaleMatrix jruby script, but I run
into the same problem.

Perhaps you are suggesting that I use a different language to accomplish
this? I am on the thought of writing a simple c app to setsid on the
process, but was hoping this could all be done in ruby/jruby (well ruby
actually does work).

Any thoughts?

— On Mon, 10/20/08, Jacob K. [email protected] wrote:

to be able to launch this application/process and be able to

that is

[email protected] wrote:

cat daemonize.rb
scaleMatrix itself is a jruby script. Using
the case
out?

http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Chiaming,

You know what, you are absolutely right! I had thought that nohup-ing
would not detach it from the controlling process, but I just tested and
sure enough, I can log out and still the process runs. Too simple. So
thanks for pointing out the obvious!

Cheers,
Phy

— On Mon, 10/20/08, Chiaming H. [email protected] wrote:

Something like:
----- Original Message ----

Hello again.
WARNING: fork is highly unlikely to be safe or
(Errno::ECHILD)
(for several weeks). Any help is greatly appreciated!

From: Phy P. [email protected]

how to create a daemonized process e.g. a

Hello!

(RuntimeError)

logout). I think I am using daemons in
#!/usr/bin/env jruby
this
not
after
Tired of spam? Yahoo! Mail has the best

Do You Yahoo!?
http://xircles.codehaus.org/manage_email



To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email