correct fork error handling
[vlock.git] / help.c
blob1fb7aa0d7838a85a53b8ff0b53fd97071a435638
1 /* help.c -- print help and usage message.
3 * This program is copyright (C) 1994 Michael K. Johnson, and is free
4 * software which is freely distributable under the terms of the
5 * GNU General Public License version 2, included as the file COPYING in this
6 * distribution. It is NOT public domain software, and any
7 * redistribution not permitted by the GNU General Public License is
8 * expressly forbidden without prior written permission from
9 * the author.
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <unistd.h>
17 #include "vlock.h"
20 void print_help(int exitcode) {
21 fprintf(stderr,
22 "vlock: locks virtual consoles, saving your current session.\n"
23 "Usage: vlock [options]\n"
24 " Where [options] are any of:\n"
25 "-c or --current: lock only this virtual console, allowing user to\n"
26 " switch to other virtual consoles.\n"
27 "-a or --all: lock all virtual consoles by preventing other users\n"
28 " from switching virtual consoles.\n"
29 "-s or --disable-sysrq: disable sysrq while consoles are locked to\n"
30 " prevent killing vlock with SAK, requires --all.\n"
31 "-v or --version: Print the version number of vlock and exit.\n"
32 "-h or --help: Print this help message and exit.\n"
34 exit(exitcode);