aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_setproctitle.h
blob: 107725a0aa8f22cf6f6cd6c49fe461a182de8e17 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright (C) Igor Sysoev
 */


#ifndef _NGX_SETPROCTITLE_H_INCLUDED_
#define _NGX_SETPROCTITLE_H_INCLUDED_


#if (NGX_HAVE_SETPROCTITLE)

/* FreeBSD, NetBSD, OpenBSD */

#define ngx_init_setproctitle(log)
#define ngx_setproctitle           setproctitle


#elif !defined NGX_SETPROCTITLE_USES_ENV

#define NGX_SETPROCTITLE_USES_ENV  1

#if (NGX_SOLARIS)

#define NGX_SETPROCTITLE_PAD       ' '

#elif (NGX_LINUX) || (NGX_DARWIN)

#define NGX_SETPROCTITLE_PAD       '\0'

#endif

ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
void ngx_setproctitle(char *title);


#else /* !NGX_SETPROCTITLE_USES_ENV */

#define ngx_init_setproctitle(log)
#define ngx_setproctitle(title)

#endif


#endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */