POV-Ray : Newsgroups : povray.advanced-users : Pause Server Time
28 Jul 2024 12:38:12 EDT (-0400)
  Pause (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Orchid XP v2
Subject: Pause
Date: 29 Apr 2006 08:04:47
Message: <4453565f@news.povray.org>
Is there a way to "pause" POV-Ray under UNIX?


Post a reply to this message

From: Ger
Subject: Re: Pause
Date: 29 Apr 2006 08:25:46
Message: <44535b4a@news.povray.org>
Orchid XP v2 wrote:

> Is there a way to "pause" POV-Ray under UNIX?

None that I know of (but I don't know everything :) )
-- 
Ger


Post a reply to this message

From: Warp
Subject: Re: Pause
Date: 29 Apr 2006 10:12:19
Message: <44537442@news.povray.org>
Orchid XP v2 <voi### [at] devnull> wrote:
> Is there a way to "pause" POV-Ray under UNIX?

  Not in POV-Ray itself, but you can suspend (almost) any program in unix
by pressing ctrl-z on the console where you started it (this actually sends
SIGHUP to the process, which can also be sent to it by other means, eg.
using the kill command). You can then continue it by writing 'fg' in the
same console.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v2
Subject: Re: Pause
Date: 29 Apr 2006 12:10:31
Message: <44538ff7$1@news.povray.org>
>>Is there a way to "pause" POV-Ray under UNIX?
> 
> 
>   Not in POV-Ray itself, but you can suspend (almost) any program in unix
> by pressing ctrl-z on the console where you started it (this actually sends
> SIGHUP to the process, which can also be sent to it by other means, eg.
> using the kill command). You can then continue it by writing 'fg' in the
> same console.

Right, cool.

I'm running it remotely using SSH. I start POV-Ray, then log out of SSH. 
I don't know of a way of reconnecting to the original console. So I can 
use the kill command to pause it, but how can I unpause it? Is there 
some signal for that, or...?


Post a reply to this message

From: Florian Brucker
Subject: Re: Pause
Date: 29 Apr 2006 14:42:35
Message: <4453b39b@news.povray.org>
> I'm running it remotely using SSH. I start POV-Ray, then log out of SSH. 
> I don't know of a way of reconnecting to the original console. So I can 
> use the kill command to pause it, but how can I unpause it? Is there 
> some signal for that, or...?

Yep, there is a signal for that, "CONT". You can use the "kill" command 
to send it to your POV process (Despite its name, "kill" can send any 
signal to a process). You need the process id (PID) of the POV process 
to do that, which you can get from ps:

	ps -A | grep povray

The first number in the line shown is the PID. Use it with kill:

	kill -s CONT your_pid_here

You may need to grep for something else instead of "povray" if you're 
using MegaPOV.


HTH,
Florian


Post a reply to this message

From: Orchid XP v2
Subject: Re: Pause
Date: 29 Apr 2006 15:11:15
Message: <4453ba53$1@news.povray.org>
Florian Brucker wrote:
>> I'm running it remotely using SSH. I start POV-Ray, then log out of 
>> SSH. I don't know of a way of reconnecting to the original console. So 
>> I can use the kill command to pause it, but how can I unpause it? Is 
>> there some signal for that, or...?
> 
> 
> Yep, there is a signal for that, "CONT".

OK, thanks.

> (Despite its name, "kill" can send any signal to a process).

Yes... another bit of UNIX randomness.

As far as I know, kill merely *defaults* to sending SIG_KILL...


Post a reply to this message

From: Warp
Subject: Re: Pause
Date: 29 Apr 2006 15:31:21
Message: <4453bf06@news.povray.org>
Orchid XP v2 <voi### [at] devnull> wrote:
> As far as I know, kill merely *defaults* to sending SIG_KILL...

  No, it defaults to sending SIGTERM.

  SIGKILL should basically never be used because it's "too strong", only
when no other options work.

  (OTOH there exist situations where even SIGKILL won't kill a process,
but that's another story.)

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Pause
Date: 29 Apr 2006 15:42:35
Message: <4453c1a4@news.povray.org>
Orchid XP v2 <voi### [at] devnull> wrote:
> I'm running it remotely using SSH. I start POV-Ray, then log out of SSH. 
> I don't know of a way of reconnecting to the original console. So I can 
> use the kill command to pause it, but how can I unpause it? Is there 
> some signal for that, or...?

  Actually what you want to use here is an utility called 'screen'.
'screen' is a terminal emulator which keeps running in the background
independently of the terminal process which started it. It can be used
to keep programs running in the background even if you close terminals
or log out of the system.
  It works like this:

  The first time you want to use 'screen', log in the system and just
write 'screen' (it will give you some info and ask you to press enter).
  Now you are in the 'screen' terminal emulation. You'll not notice any
difference (except that ctrl-a is captured by screen).
  Now start povray (or whichever program you want).
  Now, while povray is running, press ctrl-a ctrl-d. This will "detach"
the current screen. This means that you "exit" screen to the console
where you started it in the first place, but screen (and povray, which
you started inside it) will keep running in the background.
  Now you can log out and povray will still be running.

  When you want to open screen again, log in and write "screen -r" (r as in
reattach) and voila, the console where you started povray from pops up.

  You can actually open several virtual consoles from screen. This is done
by pressing ctrl-a ctrl-c. To change between the last two consoles press
ctrl-a ctrl-a. You can also jump to a specific console with ctrl-a <number>.
To close a console simply write "exit" there (you can also kill a console
with ctrl-a ctrl-k, but that violently kills all the processes running in
that console so be careful).
  If you write "exit" in the only virtual console, it will terminate screen
altogether.

  Screen is especially useful when connecting to a remote machine with ssh
because it makes things safer. Your connection may suddenly be cut, but
that doesn't matter: After you log in again, you can get back to where
you were with "screen -d -r" (in this case the -d makes the running screen
to remotely deattach first; this is necessary because it was not explicitly
deattached when the connection suddenly dropped).

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v2
Subject: Re: Pause
Date: 29 Apr 2006 19:00:02
Message: <4453eff2$1@news.povray.org>
>>I'm running it remotely using SSH. I start POV-Ray, then log out of SSH. 
>>I don't know of a way of reconnecting to the original console. So I can 
>>use the kill command to pause it, but how can I unpause it? Is there 
>>some signal for that, or...?
> 
> 
>   Actually what you want to use here is an utility called 'screen'.

Thanks for the info. I'll give that a go.


Post a reply to this message

From: Orchid XP v2
Subject: Re: Pause
Date: 29 Apr 2006 19:01:16
Message: <4453f03c$1@news.povray.org>
>>As far as I know, kill merely *defaults* to sending SIG_KILL...
> 
> 
>   No, it defaults to sending SIGTERM.

Ah yes, you're right. (Actually, you do that a lot... must be skill or 
something.)

>   SIGKILL should basically never be used because it's "too strong", only
> when no other options work.

Isn't that the one the kernel sends during shutdown?


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.