Deleted Added
full compact
adjkerntz.c (158516) adjkerntz.c (163628)
1/*
2 * Copyright (C) 1993-1998 by Andrey A. Chernov, Moscow, Russia.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27#if 0
28#ifndef lint
29static const char copyright[] =
30"@(#)Copyright (C) 1993-1996 by Andrey A. Chernov, Moscow, Russia.\n\
31 All rights reserved.\n";
32#endif /* not lint */
33#endif
34#include <sys/cdefs.h>
1/*
2 * Copyright (C) 1993-1998 by Andrey A. Chernov, Moscow, Russia.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27#if 0
28#ifndef lint
29static const char copyright[] =
30"@(#)Copyright (C) 1993-1996 by Andrey A. Chernov, Moscow, Russia.\n\
31 All rights reserved.\n";
32#endif /* not lint */
33#endif
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sbin/adjkerntz/adjkerntz.c 158516 2006-05-13 11:58:58Z pjd $");
35__FBSDID("$FreeBSD: head/sbin/adjkerntz/adjkerntz.c 163628 2006-10-23 10:48:19Z ru $");
36
37/*
38 * Andrey A. Chernov <ache@astral.msk.su> Dec 20 1993
39 *
40 * Fix kernel time value if machine run wall CMOS clock
41 * (and /etc/wall_cmos_clock file present)
42 * using zoneinfo rules or direct TZ environment variable set.
43 * Use Joerg Wunsch idea for seconds accurate offset calculation

--- 77 unchanged lines hidden (view full) ---

121 sigemptyset(&mask);
122 sigemptyset(&emask);
123 sigaddset(&mask, SIGTERM);
124
125 openlog("adjkerntz", LOG_PID|LOG_PERROR, LOG_DAEMON);
126
127 (void) signal(SIGHUP, SIG_IGN);
128
36
37/*
38 * Andrey A. Chernov <ache@astral.msk.su> Dec 20 1993
39 *
40 * Fix kernel time value if machine run wall CMOS clock
41 * (and /etc/wall_cmos_clock file present)
42 * using zoneinfo rules or direct TZ environment variable set.
43 * Use Joerg Wunsch idea for seconds accurate offset calculation

--- 77 unchanged lines hidden (view full) ---

121 sigemptyset(&mask);
122 sigemptyset(&emask);
123 sigaddset(&mask, SIGTERM);
124
125 openlog("adjkerntz", LOG_PID|LOG_PERROR, LOG_DAEMON);
126
127 (void) signal(SIGHUP, SIG_IGN);
128
129 if (init && daemon(0, 1)) {
129 if (init && daemon(0,
130#ifdef DEBUG
131 1
132#else
133 0
134#endif
135 )) {
130 syslog(LOG_ERR, "daemon: %m");
131 return 1;
132 }
133
134again:
135 (void) sigprocmask(SIG_BLOCK, &mask, NULL);
136 (void) signal(SIGTERM, fake);
137

--- 238 unchanged lines hidden ---
136 syslog(LOG_ERR, "daemon: %m");
137 return 1;
138 }
139
140again:
141 (void) sigprocmask(SIG_BLOCK, &mask, NULL);
142 (void) signal(SIGTERM, fake);
143

--- 238 unchanged lines hidden ---