Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.15.12 ]​[ nginx-1.16.0 ]​

0001 
0002 /*
0003  * Copyright (C) Igor Sysoev
0004  * Copyright (C) Nginx, Inc.
0005  */
0006 
0007 
0008 #ifndef _NGX_SETPROCTITLE_H_INCLUDED_
0009 #define _NGX_SETPROCTITLE_H_INCLUDED_
0010 
0011 
0012 #if (NGX_HAVE_SETPROCTITLE)
0013 
0014 /* FreeBSD, NetBSD, OpenBSD */
0015 
0016 #define ngx_init_setproctitle(log) NGX_OK
0017 #define ngx_setproctitle(title)    setproctitle("%s", title)
0018 
0019 
0020 #else /* !NGX_HAVE_SETPROCTITLE */
0021 
0022 #if !defined NGX_SETPROCTITLE_USES_ENV
0023 
0024 #if (NGX_SOLARIS)
0025 
0026 #define NGX_SETPROCTITLE_USES_ENV  1
0027 #define NGX_SETPROCTITLE_PAD       ' '
0028 
0029 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
0030 void ngx_setproctitle(char *title);
0031 
0032 #elif (NGX_LINUX) || (NGX_DARWIN)
0033 
0034 #define NGX_SETPROCTITLE_USES_ENV  1
0035 #define NGX_SETPROCTITLE_PAD       '\0'
0036 
0037 ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
0038 void ngx_setproctitle(char *title);
0039 
0040 #else
0041 
0042 #define ngx_init_setproctitle(log) NGX_OK
0043 #define ngx_setproctitle(title)
0044 
0045 #endif /* OSes */
0046 
0047 #endif /* NGX_SETPROCTITLE_USES_ENV */
0048 
0049 #endif /* NGX_HAVE_SETPROCTITLE */
0050 
0051 
0052 #endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */