src/os/unix/ngx_setproctitle.h - nginx-1.7.10

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_SETPROCTITLE_H_INCLUDED_
  6. #define _NGX_SETPROCTITLE_H_INCLUDED_


  7. #if (NGX_HAVE_SETPROCTITLE)

  8. /* FreeBSD, NetBSD, OpenBSD */

  9. #define ngx_init_setproctitle(log) NGX_OK
  10. #define ngx_setproctitle(title)    setproctitle("%s", title)


  11. #else /* !NGX_HAVE_SETPROCTITLE */

  12. #if !defined NGX_SETPROCTITLE_USES_ENV

  13. #if (NGX_SOLARIS)

  14. #define NGX_SETPROCTITLE_USES_ENV  1
  15. #define NGX_SETPROCTITLE_PAD       ' '

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

  18. #elif (NGX_LINUX) || (NGX_DARWIN)

  19. #define NGX_SETPROCTITLE_USES_ENV  1
  20. #define NGX_SETPROCTITLE_PAD       '\0'

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

  23. #else

  24. #define ngx_init_setproctitle(log) NGX_OK
  25. #define ngx_setproctitle(title)

  26. #endif /* OSes */

  27. #endif /* NGX_SETPROCTITLE_USES_ENV */

  28. #endif /* NGX_HAVE_SETPROCTITLE */


  29. #endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */