2 * Copyright (c) 2006 Darren Tucker. All rights reserved.
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 #include "openbsd-compat/openbsd-compat.h"
31 platform_pre_listen(void)
33 #ifdef LINUX_OOM_ADJUST
34 /* Adjust out-of-memory killer so listening process is not killed */
40 platform_post_listen(void)
43 ssh_systemd_notify_ready();
48 platform_pre_fork(void)
50 #ifdef USE_SOLARIS_PROCESS_CONTRACTS
51 solaris_contract_pre_fork();
56 platform_pre_restart(void)
59 ssh_systemd_notify_reload();
61 #ifdef LINUX_OOM_ADJUST
67 platform_post_fork_parent(pid_t child_pid
)
69 #ifdef USE_SOLARIS_PROCESS_CONTRACTS
70 solaris_contract_post_fork_parent(child_pid
);
75 platform_post_fork_child(void)
77 #ifdef USE_SOLARIS_PROCESS_CONTRACTS
78 solaris_contract_post_fork_child();
80 #ifdef LINUX_OOM_ADJUST