1.\" 2.\" Copyright (c) 2003 Matthew Dillon, All Rights Reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $DragonFly: src/usr.bin/checkpt/checkpt.1,v 1.5 2007/06/30 19:20:48 swildner Exp $ 26.\" 27.Dd October 19, 2003 28.Dt CHECKPT 1 29.Os 30.Sh NAME 31.Nm checkpt 32.Nd resume checkpointed program 33.Sh SYNOPSIS 34.Nm 35.Fl r Ar file.ckpt 36.Sh DESCRIPTION 37The 38.Nm 39utility will resume the checkpointed program from the specified checkpoint 40file. 41Programs can be checkpointed using ^E. 42.Pp 43By default, only members of the wheel group can checkpoint a program. 44The group can be changed with the sysctl 45.Va kern.ckptgroup . 46The checkpoint file template can be changed with the sysctl 47.Va kern.ckptfile . 48.Pp 49The checkpointing utility is fairly primitive. 50Only programs operating on normal files can be properly restored. 51Programs which operate on devices, sockets, or pipes (including piped 52commands) cannot be completely. 53File descriptors 0, 1, and 2, are not saved and the restored program will 54inherit the descriptors from 55.Nm . 56.Pp 57Programs can actively support checkpointing by catching the 58.Dv SIGCKPT 59signal, cleaning up, and manually calling the 60.Fn sys_checkpoint 61system call. 62The program can then choose whether to continue running or exit. 63The resumed program will get a (typically) positive return value from 64.Fn sys_checkpoint 65which it can use to determine whether it just made the system call or whether 66it is being resumed from the system call. 67The program can then reconstruct non-checkpointed elements and resume. 68.Sh SEE ALSO 69.Xr stty 1 , 70.Xr sys_checkpoint 2 71.Sh HISTORY 72The 73.Nm 74command first appeared in 75.Dx 1.0 . 76