POV-Ray : Newsgroups : povray.advanced-users : Pause Server Time
28 Jul 2024 14:31:20 EDT (-0400)
  Pause (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
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

From: Warp
Subject: Re: Pause
Date: 29 Apr 2006 21:24:09
Message: <445411b8@news.povray.org>
Orchid XP v2 <voi### [at] devnull> wrote:
> >   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?

  Well, during shutdown the kernel first sends SIGTERM to all running
processes, after which it sends SIGKILL to the remaining. I suppose in
most cases there aren't any processes running after the former (at least
if all processes are bug-free and behave correctly) but it's a good way
to make sure that all processes are truely terminated before shutdown.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Pause
Date: 30 Apr 2006 07:04:31
Message: <445499bf@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   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).

  Correction: SIGTSTP

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v2
Subject: Re: Pause
Date: 30 Apr 2006 08:06:22
Message: <4454a83e$1@news.povray.org>
>>>  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?
> 
> 
>   Well, during shutdown the kernel first sends SIGTERM to all running
> processes, after which it sends SIGKILL to the remaining. I suppose in
> most cases there aren't any processes running after the former (at least
> if all processes are bug-free and behave correctly) but it's a good way
> to make sure that all processes are truely terminated before shutdown.

That's more of less what I figured, yes. :-)


Post a reply to this message

From: How Camp
Subject: Re: Pause
Date: 1 May 2006 08:10:01
Message: <web.4455f9fdf960665f429e56f30@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:

>   Well, during shutdown the kernel first sends SIGTERM to all running
> processes, after which it sends SIGKILL to the remaining. I suppose in
> most cases there aren't any processes running after the former (at least
> if all processes are bug-free and behave correctly) but it's a good way
> to make sure that all processes are truely terminated before shutdown.


Warp, would you be able to point me to a link documenting this behavior?
I'm interested in reading more about the general boot/shutdown order of
things.  I assume not all flavors of Unix/Linux implement the same
proceedures in the same order, do they?

- How


Post a reply to this message

From: Warp
Subject: Re: Pause
Date: 1 May 2006 09:01:00
Message: <4456068b@news.povray.org>
How Camp <hac### [at] gmailcom> wrote:
> Warp, would you be able to point me to a link documenting this behavior?
> I'm interested in reading more about the general boot/shutdown order of
> things.  I assume not all flavors of Unix/Linux implement the same
> proceedures in the same order, do they?

  I don't know any specific documents, but try googling for things like
"init", "runlevel 6" and "linux boot".
  The last one, for example, gave this:

http://ourworld.compuserve.com/homepages/KanjiFlash/BPTour.htm

  It's about the booting process, not the shutdown, though.

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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