s3: VFS: vfs_extd_audit: Remove unlink_fn. No longer used.
[Samba.git] / source4 / smbd / service.h
blob0b6f937b63ceb5221787b4a763818b49e26a1d90
1 /*
2 Unix SMB/CIFS implementation.
4 SERVER SERVICE code
6 Copyright (C) Andrew Tridgell 2003-2005
7 Copyright (C) Stefan (metze) Metzmacher 2004
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef __SERVICE_H__
24 #define __SERVICE_H__
27 #include "smbd/service_stream.h"
28 #include "smbd/service_task.h"
30 struct process_details {
31 unsigned int instances;
34 static const struct process_details initial_process_details = {
35 .instances = 0
38 struct service_details {
40 * Prevent the standard process model from forking a new worker
41 * process when accepting a new connection. Do this when the service
42 * relies on shared state, or the over-head of forking would be a
43 * significant part of the response time
45 bool inhibit_fork_on_accept;
47 * Prevent the pre-fork process model from pre-forking any worker
48 * processes. In this mode pre-fork is equivalent to standard with
49 * inhibit_fork_on_accept set.
51 bool inhibit_pre_fork;
53 * Initialise the server task.
55 NTSTATUS (*task_init) (struct task_server *);
57 * post fork processing this is called:
58 * - standard process model
59 * immediately after the task_init.
61 * - single process model
62 * immediately after the task_init
64 * - prefork process model, inhibit_pre_fork = true
65 * immediately after the task_init
67 * - prefork process model, inhibit_pre_fork = false
68 * after each service worker has forked. It is not run on the
69 * service master process.
71 * The post fork hook is not called in the standard model if a new
72 * process is forked on a new connection. It is instead called
73 * immediately after the task_init.
75 void (*post_fork) (struct task_server *, struct process_details *);
78 #include "smbd/service_proto.h"
80 #endif /* __SERVICE_H__ */