Forum: JRuby Re: daemons

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chiaming H. (Guest)
on 2008-10-21 01:13
(Received via mailing list)
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. <removed_email_address@domain.invalid>
To: removed_email_address@domain.invalid
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. <removed_email_address@domain.invalid> wrote:

> >
> >
> to be able to launch this application/process and be able to
> >
> >>>
> that is
> >> <removed_email_address@domain.invalid> 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
http://mail.yahoo.com

---------------------------------------------------------------------
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
Phy P. (Guest)
on 2008-10-21 01:39
(Received via mailing list)
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. <removed_email_address@domain.invalid> 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. <removed_email_address@domain.invalid>
> >
> > >> 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
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.