home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer,comp.unix.,wizards
- Path: sparky!uunet!usc!wupost!sdd.hp.com!news.cs.indiana.edu!usenet.ucs.indiana.edu!newshost.cs.rose-hulman.edu!news
- From: sullivan@cs.rose-hulman.edu (Fred Sullivan)
- Subject: Re: How to restart a process after the machine is up.
- In-Reply-To: jhu@bronze.ucs.indiana.edu's message of Mon, 17 Aug 1992 03:16:21 GMT
- Message-ID: <SULLIVAN.92Aug17154930@liz.cs.rose-hulman.edu>
- Sender: news@cs.rose-hulman.edu (The News Administrator)
- Nntp-Posting-Host: liz.cs.rose-hulman.edu
- Organization: Rose-Hulman Institute of Technology
- References: <Bt3yF9.JFI@usenet.ucs.indiana.edu>
- Date: Mon, 17 Aug 1992 20:49:30 GMT
- Lines: 20
-
- In article <Bt3yF9.JFI@usenet.ucs.indiana.edu> jhu@bronze.ucs.indiana.edu (Jun Hu) writes:
-
- I have a program which needs big amounts of CPU time. It
- has been running on the unix-based machine for a while. Because
- the machine will be down once every month, I would like to have my
- process terminated some way (save the core image of the process? )
- before the machine is down and restarted manually from the point it
- stops after the machine is up, so the previous computing time is
- not wasted.
-
- A trick which may or may not be applicable. If the current state of the
- process is easily saved (say by writing to a file) you can write a signal
- handler for an unused signal (e.g. SIGUSR1), which dumps the state.
-
- When the program starts up, have it read its starting state from the file.
-
- When you want to shut down the machine, just send the process a signal. I
- once used this technique to keep a program running for several months.
-
-
-