os.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004, 2005, 2007-2009, 2014  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2002  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: os.h,v 1.31 2009/08/05 23:47:43 tbox Exp $ */
00019 
00020 #ifndef NS_OS_H
00021 #define NS_OS_H 1
00022 
00023 /*! \file */
00024 
00025 #include <isc/types.h>
00026 
00027 void
00028 ns_os_init(const char *progname);
00029 
00030 void
00031 ns_os_daemonize(void);
00032 
00033 void
00034 ns_os_opendevnull(void);
00035 
00036 void
00037 ns_os_closedevnull(void);
00038 
00039 void
00040 ns_os_chroot(const char *root);
00041 
00042 void
00043 ns_os_inituserinfo(const char *username);
00044 
00045 void
00046 ns_os_changeuser(void);
00047 
00048 void
00049 ns_os_adjustnofile(void);
00050 
00051 void
00052 ns_os_minprivs(void);
00053 
00054 FILE *
00055 ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user);
00056 
00057 void
00058 ns_os_writepidfile(const char *filename, isc_boolean_t first_time);
00059 
00060 isc_boolean_t
00061 ns_os_issingleton(const char *filename);
00062 
00063 void
00064 ns_os_shutdown(void);
00065 
00066 isc_result_t
00067 ns_os_gethostname(char *buf, size_t len);
00068 
00069 void
00070 ns_os_shutdownmsg(char *command, isc_buffer_t *text);
00071 
00072 void
00073 ns_os_tzset(void);
00074 
00075 void
00076 ns_os_started(void);
00077 
00078 #endif /* NS_OS_H */

Generated on Tue Apr 28 17:41:04 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha