Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Maxim Dounin
April 25, 2020 09:14PM
Hello!

On Thu, Apr 16, 2020 at 04:51:04PM -0700, Thibault Charbonnier wrote:

> On 3/3/20 6:28 AM, Maxim Dounin wrote:
> > Checking for the oldpid file does not look like a reliable
> > approach to me.
>
> Hi Maxim,
>
> For this patch to cover TEST 3 in my previously attached test suite
> (cancel binary upgrade via SIGQUIT on the new binary), we need a way for
> a new binary to know whether an old binary is still running or not.

Sure. The problem is that checking this via a filesystem which
can be arbitrary modified by external means is not reliable.
Further, if the pid file was changed in the configuration along
with binary upgrade, there will be no oldpid file available from
the very start of the new binary.

> Do you have another suggestion on how to achieve this? Checking for the
> existence of nginx.oldpid seems acceptable to me in this case.

A better approach might be to check parent's pid instead, much
like we do when handling the changebin signal on unix (see
src/os/unix/ngx_process.c).

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Thibault Charbonnier 776 February 26, 2020 07:52PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Maxim Dounin 273 February 27, 2020 10:26AM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files. Attachments

Thibault Charbonnier 298 February 27, 2020 07:26PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Thibault Charbonnier 283 March 02, 2020 11:28AM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Maxim Dounin 290 March 03, 2020 09:30AM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Thibault Charbonnier 266 April 16, 2020 07:52PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Maxim Dounin 264 April 25, 2020 09:14PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Thibault Charbonnier 290 April 27, 2020 07:28PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Thibault Charbonnier 256 May 08, 2020 04:42PM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

Maxim Dounin 256 May 14, 2020 09:08AM

Re: [PATCH] Ensured SIGQUIT deletes listening UNIX socket files.

ru@nginx.com 368 June 01, 2020 03:48PM



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

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready