Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Core: remove unused FIOASYNC.

June 27, 2018 08:58AM
On Mon, Jun 25, 2018 at 11:16:12AM -0700, Ian Gudger via nginx-devel wrote:
> # HG changeset patch
> # User Ian Gudger <igudger@google.com>
> # Date 1529449008 25200
> # Tue Jun 19 15:56:48 2018 -0700
> # Node ID 9427538acbc50142afbe91a11a1d4f907a00d257
> # Parent 118885f7a5774962f1145693d9c26a4c199ca6ea
> Core: remove unused FIOASYNC.
>
> FIOASYNC, F_SETOWN and SIGIO seem to no longer serve any function.

Can you decode your "seem to no longer server any function", please?

> diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
> --- a/src/os/unix/ngx_process.c
> +++ b/src/os/unix/ngx_process.c
> @@ -71,8 +71,6 @@ ngx_signal_t signals[] = {
>
> { SIGINT, "SIGINT", "", ngx_signal_handler },
>
> - { SIGIO, "SIGIO", "", ngx_signal_handler },
> -
> { SIGCHLD, "SIGCHLD", "", ngx_signal_handler },
>
> { SIGSYS, "SIGSYS, SIG_IGN", "", NULL },
> @@ -87,7 +85,6 @@ 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;
> ngx_int_t s;
>
> @@ -142,21 +139,6 @@ ngx_spawn_process(ngx_cycle_t *cycle, ng
> return NGX_INVALID_PID;
> }
>
> - on = 1;
> - if (ioctl(ngx_processes[s].channel[0], FIOASYNC, &on) == -1) {
> - ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
> - "ioctl(FIOASYNC) failed while spawning
> \"%s\"", name);
> - ngx_close_channel(ngx_processes[s].channel, cycle->log);
> - return NGX_INVALID_PID;
> - }
> -
> - if (fcntl(ngx_processes[s].channel[0], F_SETOWN, ngx_pid) == -1) {
> - ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
> - "fcntl(F_SETOWN) failed while spawning
> \"%s\"", name);
> - ngx_close_channel(ngx_processes[s].channel, cycle->log);
> - return NGX_INVALID_PID;
> - }
> -
> if (fcntl(ngx_processes[s].channel[0], F_SETFD, FD_CLOEXEC) == -1) {
> ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
> "fcntl(FD_CLOEXEC) failed while spawning \"%s\"",
> @@ -394,10 +376,6 @@ ngx_signal_handler(int signo, siginfo_t
> ngx_sigalrm = 1;
> break;
>
> - case SIGIO:
> - ngx_sigio = 1;
> - break;
> -
> case SIGCHLD:
> ngx_reap = 1;
> break;
> @@ -433,8 +411,6 @@ ngx_signal_handler(int signo, siginfo_t
>
> case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
> case ngx_signal_value(NGX_CHANGEBIN_SIGNAL):
> - case SIGIO:
> - action = ", ignoring";

Removing setting of an "action" variable looks like an error.

> break;
> }
>
> diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
> --- a/src/os/unix/ngx_process_cycle.c
> +++ b/src/os/unix/ngx_process_cycle.c
> @@ -34,7 +34,6 @@ ngx_pid_t ngx_pid;
> ngx_pid_t ngx_parent;
>
> sig_atomic_t ngx_reap;
> -sig_atomic_t ngx_sigio;
> sig_atomic_t ngx_sigalrm;
> sig_atomic_t ngx_terminate;
> sig_atomic_t ngx_quit;
> @@ -88,7 +87,6 @@ ngx_master_process_cycle(ngx_cycle_t *cy
> sigemptyset(&set);
> sigaddset(&set, SIGCHLD);
> sigaddset(&set, SIGALRM);
> - sigaddset(&set, SIGIO);
> sigaddset(&set, SIGINT);
> sigaddset(&set, ngx_signal_value(NGX_RECONFIGURE_SIGNAL));
> sigaddset(&set, ngx_signal_value(NGX_REOPEN_SIGNAL));
> diff --git a/src/os/unix/ngx_process_cycle.h b/src/os/unix/ngx_process_cycle.h
> --- a/src/os/unix/ngx_process_cycle.h
> +++ b/src/os/unix/ngx_process_cycle.h
> @@ -47,7 +47,6 @@ extern ngx_uint_t ngx_daemonized;
> extern ngx_uint_t ngx_exiting;
>
> extern sig_atomic_t ngx_reap;
> -extern sig_atomic_t ngx_sigio;
> extern sig_atomic_t ngx_sigalrm;
> extern sig_atomic_t ngx_quit;
> extern sig_atomic_t ngx_debug_quit;

There's also a SIGIO related code in ngx_master_process_cycle(),
added in 8abb88374c6c.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Core: remove unused FIOASYNC.

Ian Gudger via nginx-devel 142 June 25, 2018 02:18PM

Re: [PATCH] Core: remove unused FIOASYNC.

ru@nginx.com 51 June 27, 2018 08:58AM

Re: [PATCH] Core: remove unused FIOASYNC.

Ian Gudger via nginx-devel 49 June 27, 2018 01:12PM

Re: [PATCH] Core: remove unused FIOASYNC.

ru@nginx.com 50 June 27, 2018 02:34PM

Re: [PATCH] Core: remove unused FIOASYNC.

Ian Gudger via nginx-devel 55 June 27, 2018 04:42PM

Re: [PATCH] Core: remove unused FIOASYNC.

ru@nginx.com 51 June 28, 2018 05:30AM

Re: [PATCH] Core: remove unused FIOASYNC.

ru@nginx.com 53 June 28, 2018 07:48AM

Re: [PATCH] Core: remove unused FIOASYNC.

Ian Gudger via nginx-devel 31 July 09, 2018 02:38AM

Re: [PATCH] Core: remove unused FIOASYNC.

ru@nginx.com 62 July 11, 2018 10:22AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 87
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready