3 * Copyright (C) Igor Sysoev
7 #ifndef _NGX_SETPROCTITLE_H_INCLUDED_
8 #define _NGX_SETPROCTITLE_H_INCLUDED_
11 #if (NGX_HAVE_SETPROCTITLE)
13 /* FreeBSD, NetBSD, OpenBSD */
15 #define ngx_init_setproctitle(log)
16 #define ngx_setproctitle setproctitle
19 #else /* !NGX_HAVE_SETPROCTITLE */
21 #if !defined NGX_SETPROCTITLE_USES_ENV
25 #define NGX_SETPROCTITLE_USES_ENV 1
26 #define NGX_SETPROCTITLE_PAD ' '
28 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
29 void ngx_setproctitle(char *title);
31 #elif (NGX_LINUX) || (NGX_DARWIN)
33 #define NGX_SETPROCTITLE_USES_ENV 1
34 #define NGX_SETPROCTITLE_PAD '\0'
36 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
37 void ngx_setproctitle(char *title);
41 #define ngx_init_setproctitle(log)
42 #define ngx_setproctitle(title)
46 #endif /* NGX_SETPROCTITLE_USES_ENV */
48 #endif /* NGX_HAVE_SETPROCTITLE */
51 #endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */