aboutsummaryrefslogtreecommitdiff
path: root/src/lib/process/restrict.h
blob: 8491c990442dd1b9ac862ac0855c72f18f1c39a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright (c) 2003-2004, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file restrict.h
 * \brief Header for restrict.c
 **/

#ifndef TOR_RESTRICT_H
#define TOR_RESTRICT_H

#include "orconfig.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif

int tor_disable_debugger_attach(void);
int tor_mlockall(void);

#if !defined(HAVE_RLIM_T)
typedef unsigned long rlim_t;
#endif
int set_max_file_descriptors(rlim_t limit, int *max_out);

#endif /* !defined(TOR_RESTRICT_H) */