Remove trailing blank space characters. mdoc(7) explicitly recommends doing
[dragonfly.git] / usr.bin / checkpt / checkpt.1
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.4 2005/08/01 01:49:17 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
37 The
38 .Nm
39 utility will resume the checkpointed program from the specified checkpoint
40 file.  Programs can be checkpointed using ^E.
41 .Pp
42 By default, only members of the wheel group can checkpoint a program.
43 The group can be changed with the sysctl kern.ckptgroup.
44 The checkpoint file template can be changed with the sysctl kern.ckptfile.
45 .Pp
46 The checkpointing utility is fairly primitive.  Only programs
47 operating on normal files can be properly restored.  Programs which operate
48 on devices, sockets, or pipes (including piped commands) cannot be completely.
49 File descriptors 0, 1, and 2, are not saved and the restored program will
50 inherit the descriptors from
51 .Nm
52 .Pp
53 Programs can actively support checkpointing by catching the
54 .Dv SIGCKPT
55 signal, cleaning up, and manually calling the
56 .Fn sys_checkpoint
57 system call.  The program can then choose whether to continue running or
58 exit.  The resumed program will get a (typically) positive return value
59 from
60 .Fn sys_checkpoint
61 which it can use to determine whether it just made the system call or whether
62 it is being resumed from the system call.  The program can then reconstruct
63 non-checkpointed elements and resume.
64 .Sh SEE ALSO
65 .Xr stty 1 ,
66 .Xr sys_checkpoint 2
67 .Sh HISTORY
68 The
69 .Nm
70 command first appeared in
71 .Dx 1.0 .