aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_os.h2
-rw-r--r--src/os/unix/ngx_posix_config.h4
-rw-r--r--src/os/unix/ngx_process.c18
-rw-r--r--src/os/unix/ngx_setproctitle.h20
4 files changed, 27 insertions, 17 deletions
diff --git a/src/os/unix/ngx_os.h b/src/os/unix/ngx_os.h
index e39aab0ef..97a29e69f 100644
--- a/src/os/unix/ngx_os.h
+++ b/src/os/unix/ngx_os.h
@@ -31,7 +31,7 @@ typedef struct {
} ngx_os_io_t;
-void ngx_debug_init();
+void ngx_debug_init(void);
ngx_int_t ngx_os_init(ngx_log_t *log);
void ngx_os_status(ngx_log_t *log);
ngx_int_t ngx_daemon(ngx_log_t *log);
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h
index 0862726c3..592ff7668 100644
--- a/src/os/unix/ngx_posix_config.h
+++ b/src/os/unix/ngx_posix_config.h
@@ -8,13 +8,13 @@
#define _NGX_POSIX_CONFIG_H_INCLUDED_
-#if 0
+#if (NGX_HPUX)
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED 1
#endif
-#if 0
+#if (NGX_TRU64)
#define _REENTRANT
#endif
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 0562a4644..f9689c9af 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -23,9 +23,9 @@ ngx_int_t ngx_last_process;
ngx_process_t ngx_processes[NGX_MAX_PROCESSES];
-ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle,
- ngx_spawn_proc_pt proc, void *data,
- char *name, ngx_int_t respawn)
+ngx_pid_t
+ngx_spawn_process(ngx_cycle_t *cycle, ngx_spawn_proc_pt proc, void *data,
+ char *name, ngx_int_t respawn)
{
u_long on;
ngx_pid_t pid;
@@ -185,14 +185,16 @@ ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle,
}
-ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx)
+ngx_pid_t
+ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx)
{
return ngx_spawn_process(cycle, ngx_execute_proc, ctx, ctx->name,
NGX_PROCESS_DETACHED);
}
-static void ngx_execute_proc(ngx_cycle_t *cycle, void *data)
+static void
+ngx_execute_proc(ngx_cycle_t *cycle, void *data)
{
ngx_exec_ctx_t *ctx = data;
@@ -206,7 +208,8 @@ static void ngx_execute_proc(ngx_cycle_t *cycle, void *data)
}
-void ngx_process_get_status()
+void
+ngx_process_get_status(void)
{
int status;
char *process;
@@ -301,7 +304,8 @@ void ngx_process_get_status()
}
-void ngx_debug_point()
+void
+ngx_debug_point(void)
{
ngx_core_conf_t *ccf;
diff --git a/src/os/unix/ngx_setproctitle.h b/src/os/unix/ngx_setproctitle.h
index 107725a0a..22f7e3ea6 100644
--- a/src/os/unix/ngx_setproctitle.h
+++ b/src/os/unix/ngx_setproctitle.h
@@ -16,30 +16,36 @@
#define ngx_setproctitle setproctitle
-#elif !defined NGX_SETPROCTITLE_USES_ENV
+#else /* !NGX_HAVE_SETPROCTITLE */
-#define NGX_SETPROCTITLE_USES_ENV 1
+#if !defined NGX_SETPROCTITLE_USES_ENV
#if (NGX_SOLARIS)
+#define NGX_SETPROCTITLE_USES_ENV 1
#define NGX_SETPROCTITLE_PAD ' '
+ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
+void ngx_setproctitle(char *title);
+
#elif (NGX_LINUX) || (NGX_DARWIN)
+#define NGX_SETPROCTITLE_USES_ENV 1
#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 */
+#else
#define ngx_init_setproctitle(log)
#define ngx_setproctitle(title)
-#endif
+#endif /* OSes */
+
+#endif /* NGX_SETPROCTITLE_USES_ENV */
+
+#endif /* NGX_HAVE_SETPROCTITLE */
#endif /* _NGX_SETPROCTITLE_H_INCLUDED_ */