1*18de8d7fSPeter Avalos /* $Id: platform.c,v 1.1 2006/08/30 17:24:41 djm Exp $ */ 2*18de8d7fSPeter Avalos 3*18de8d7fSPeter Avalos /* 4*18de8d7fSPeter Avalos * Copyright (c) 2006 Darren Tucker. All rights reserved. 5*18de8d7fSPeter Avalos * 6*18de8d7fSPeter Avalos * Permission to use, copy, modify, and distribute this software for any 7*18de8d7fSPeter Avalos * purpose with or without fee is hereby granted, provided that the above 8*18de8d7fSPeter Avalos * copyright notice and this permission notice appear in all copies. 9*18de8d7fSPeter Avalos * 10*18de8d7fSPeter Avalos * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11*18de8d7fSPeter Avalos * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12*18de8d7fSPeter Avalos * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13*18de8d7fSPeter Avalos * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14*18de8d7fSPeter Avalos * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15*18de8d7fSPeter Avalos * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16*18de8d7fSPeter Avalos * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17*18de8d7fSPeter Avalos */ 18*18de8d7fSPeter Avalos 19*18de8d7fSPeter Avalos #include "config.h" 20*18de8d7fSPeter Avalos #include "platform.h" 21*18de8d7fSPeter Avalos 22*18de8d7fSPeter Avalos #include "openbsd-compat/openbsd-compat.h" 23*18de8d7fSPeter Avalos 24*18de8d7fSPeter Avalos void 25*18de8d7fSPeter Avalos platform_pre_fork(void) 26*18de8d7fSPeter Avalos { 27*18de8d7fSPeter Avalos #ifdef USE_SOLARIS_PROCESS_CONTRACTS 28*18de8d7fSPeter Avalos solaris_contract_pre_fork(); 29*18de8d7fSPeter Avalos #endif 30*18de8d7fSPeter Avalos } 31*18de8d7fSPeter Avalos 32*18de8d7fSPeter Avalos void 33*18de8d7fSPeter Avalos platform_post_fork_parent(pid_t child_pid) 34*18de8d7fSPeter Avalos { 35*18de8d7fSPeter Avalos #ifdef USE_SOLARIS_PROCESS_CONTRACTS 36*18de8d7fSPeter Avalos solaris_contract_post_fork_parent(child_pid); 37*18de8d7fSPeter Avalos #endif 38*18de8d7fSPeter Avalos } 39*18de8d7fSPeter Avalos 40*18de8d7fSPeter Avalos void 41*18de8d7fSPeter Avalos platform_post_fork_child(void) 42*18de8d7fSPeter Avalos { 43*18de8d7fSPeter Avalos #ifdef USE_SOLARIS_PROCESS_CONTRACTS 44*18de8d7fSPeter Avalos solaris_contract_post_fork_child(); 45*18de8d7fSPeter Avalos #endif 46*18de8d7fSPeter Avalos } 47