Nohup -g and ruby-1.6.7 on Solaris9

Given the following:

neelix hgs 100 %> ps -o pid,pgid,time,args -u hgs
  PID  PGID        TIME COMMAND
        [...]
  995   995 12-19:04:35 /usr/local/bin/ruby -w ./pso_test.rb

Then:

neelix hgs 101 %> /usr/bin/nohup -g -Fa 995
nohup: cannot control process 995

Why not? I had this on another ruby process as well.
Is it something to do with Ruby?

What I expected was the process group including the children to be
"nohup"ed. The nohup man page does suggest using ps -o sid to find
the process to nohup, but that is a session leader, not a process
group, and it also seems to be the login shell. Since the whole
point of this is to allow me to logout, while leaving these things
running, nohupping the login shell seems wrong to me.

I’ve not used this side of nohup before, and I’m having a job
understand the setsid man page. Can anyone tell me why this
behaviour is correct, or whether it isn’t?

This is with Ruby 1.6.7 on Solaris 9.

    Thank you
    Hugh

Has the process been started from the same shell where you call nohup?

-billy.

···

On Thu, Aug 22, 2002 at 08:40:09PM +0900, Hugh Sasse Staff Elec Eng wrote:

Given the following:

neelix hgs 100 %> ps -o pid,pgid,time,args -u hgs
  PID  PGID        TIME COMMAND
        [...]
  995   995 12-19:04:35 /usr/local/bin/ruby -w ./pso_test.rb

Then:

neelix hgs 101 %> /usr/bin/nohup -g -Fa 995
nohup: cannot control process 995

Why not? I had this on another ruby process as well.
Is it something to do with Ruby?


Meisterbohne Söflinger Straße 100 Tel: +49-731-399 499-0
eLösungen 89077 Ulm Fax: +49-731-399 499-9

Given the following:
PID PGID TIME COMMAND
995 995 12-19:04:35 /usr/local/bin/ruby -w ./pso_test.rb
neelix hgs 101 %> /usr/bin/nohup -g -Fa 995
nohup: cannot control process 995

Why not? I had this on another ruby process as well.
Is it something to do with Ruby?

Has the process been started from the same shell where you call nohup?

No, it is still in the foreground, but it is one of my shells…

-billy.

    Hugh
···

On Thu, 22 Aug 2002, Philipp Meier wrote:

On Thu, Aug 22, 2002 at 08:40:09PM +0900, Hugh Sasse Staff Elec Eng wrote:

I think I’ve got this to work:

^Z to stop but not kill the job,
ps -o pid,pgid,tty,s,wchan,args
find the pid and pgid which are the same for the job, 995
nohup -g -Fa 995
which seemed to work,
bg %1
to get the job out of the stopped state into the background,
then logout.

Looking from the other shell it seems to be running.

This is fairly off-topic for ruby (but I wasn’t sure at first),
but I hope this info helps someone else.

    Hugh
···

On Thu, 22 Aug 2002, Hugh Sasse Staff Elec Eng wrote:

On Thu, 22 Aug 2002, Philipp Meier wrote:

On Thu, Aug 22, 2002 at 08:40:09PM +0900, Hugh Sasse Staff Elec Eng wrote:

neelix hgs 101 %> /usr/bin/nohup -g -Fa 995
nohup: cannot control process 995

Why not? I had this on another ruby process as well.
Is it something to do with Ruby?

Has the process been started from the same shell where you call nohup?

No, it is still in the foreground, but it is one of my shells…