Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / src / os / unix / ngx_setproctitle.h
blob2323408c46ee615872bd9dc09ee56f53dc3557f0
2 /*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
5 */
8 #ifndef _NGX_SETPROCTITLE_H_INCLUDED_
9 #define _NGX_SETPROCTITLE_H_INCLUDED_
12 #if (NGX_HAVE_SETPROCTITLE)
14 /* FreeBSD, NetBSD, OpenBSD */
16 #define ngx_init_setproctitle(log)
17 #define ngx_setproctitle(title) setproctitle("%s", title)
20 #else /* !NGX_HAVE_SETPROCTITLE */
22 #if !defined NGX_SETPROCTITLE_USES_ENV
24 #if (NGX_SOLARIS)
26 #define NGX_SETPROCTITLE_USES_ENV 1
27 #define NGX_SETPROCTITLE_PAD ' '
29 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
30 void ngx_setproctitle(char *title);
32 #elif (NGX_LINUX) || (NGX_DARWIN)
34 #define NGX_SETPROCTITLE_USES_ENV 1
35 #define NGX_SETPROCTITLE_PAD '\0'
37 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
38 void ngx_setproctitle(char *title);
40 #else
42 #define ngx_init_setproctitle(log)
43 #define ngx_setproctitle(title)
45 #endif /* OSes */
47 #endif /* NGX_SETPROCTITLE_USES_ENV */
49 #endif /* NGX_HAVE_SETPROCTITLE */
52 #endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */