6 messages in com.perforce.perforce-user[p4] good way to stop/restart server| From | Sent On | Attachments |
|---|---|---|
| Chris Chan | 09 Sep 1999 14:00 | |
| Stephen Vance | 09 Sep 1999 20:36 | |
| Fredric | 10 Sep 1999 14:31 | |
| Scott Blachowicz | 10 Sep 1999 15:48 | |
| Richard Folwell | 11 Sep 1999 02:50 | |
| Stephen Vance | 11 Sep 1999 19:42 |
| Subject: | [p4] good way to stop/restart server![]() |
|---|---|
| From: | Stephen Vance (ste...@vance.com) |
| Date: | 09/11/1999 07:42:41 PM |
| List: | com.perforce.perforce-user |
You are probably right on this count. I have heard similar explanations.
Keep in mind, however, that not all processes are as well written for the Unix
environment as Perforce. Signal 9 is immediate and unconditional, with no
opportunity
for application cleanup. Signal 15 communicates the same intent to terminate,
but can
be caught by an application and any appropriate cleanup can be handled
gracefully. I
have to flinch whenever I see 9 recommended as a first try.
Steve
Fredric wrote:
As far as I know the safest way top stop perforce under Unix is to kill the parent demon (kill -9 ....) then wait for the children to finish. The problem is to find the pid of the parent demon but you can figure that out using "ps -e --forest" (in Linux) or similar.
The reason this is safe is because the parent demon will fork a process to handle each request.
(NOTE! I am not a peforce developer, this is just something I have read somewhere in this mailing list or maybe in a similar forum)
/Fredric
Stephen Vance wrote:
On NT, use the Services control panel applet. Under Unix, killing it is safe
under
the conditions that killing anything is safe: you have to use the right signal,
one that's catchable and caught. Therefore, use 'killall -15 p4d' if you are
not
concerned about clobbering a bunch of p4d's. Otherwise, use 'kill -15 <pid>'.
An
alternative to '-15' is '-TERM'. Other platforms I can't help you.
Chris Chan wrote:
Hi there,
Anyone knows if there's any way to safely stop p4d? Is killing the p4d process good enough? Our department is having problems stopping and starting p4d. What process should I kill to stop p4d? Is the sequence of killing the processes important in shutting down the server?
The reason for me to stop and restart the server is to truncate the log in the LOGS. Anyone know if there's a good way to truncate the log without stopping p4d? Thanks a bunch!
Chris
-- ======================================================================= Stephen Vance | mailto:steve at vance.com | http://www.vance.com =======================================================================
A computer programmer is a machine for turning coffee into programs. -- Paraphrase of the late mathematician Paul Erdo"s




