home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer,comp.unix.
- Path: sparky!uunet!munnari.oz.au!mips!mips!darwin.sura.net!cs.ucf.edu!tarpit!fang!att!cbnewsk!ksc
- From: ksc@cbnewsk.cb.att.com (kenneth.s.cobler)
- Subject: Re: How to restart a process after the machine is up.
- Organization: AT&T
- Distribution: na
- Date: Mon, 17 Aug 1992 19:59:17 GMT
- Message-ID: <1992Aug17.195917.948@cbnewsk.cb.att.com>
- References: <Bt3yF9.JFI@usenet.ucs.indiana.edu>
- Lines: 24
-
- In article <Bt3yF9.JFI@usenet.ucs.indiana.edu> jhu@bronze.ucs.indiana.edu (Jun Hu) writes:
- >Hi, Could someone help me with following question?
- >
- [ deleted ]
-
- >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 way to handle such a situation is to have your program write out
- all important data structures and values to a file then terminate
- itself upon receiving a signal (like SIGUSR1). This allows your
- shutdown script to send a kill -16 to the PID of your program and
- it can gracefully exit with the current values of the various datum.
- During boot, your program can check for the file and quickly load
- all the values saved in the file.
-
- Kenneth Cobler ksc@cbnewsk.att.com or ken@ihlpm.att.com
- AT&T Bell Laboratories attmail!cbnewsk!ksc or attmail!ihlpm!ken
- 2000 N. Naperville Rd.
- Naperville, IL 60566
-