Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Wrapper doesn't exit upon SIGTERM when coprocess running in foreground #3

@dekobon

Description

@dekobon

When the wrapper is configured to use coprocesses, restarts are set to unlimited and backgrounding is disabled, when the wrapper receives a SIGTERM it fails to exit. Only after a second SIGTERM or SIGINT does the wrapper exit.

To Reproduce
Set a coprocess config block like the following and run.

"coprocess": {
    "blank": {
      "name": "blank",
      "exec": [ "echo", "''" ],
      "restarts": "unlimited",
      "background": "true",
      "exec_event": "pre-start",
      "stop_event": "exit"
    }
}

Expected behavior
The wrapper should exit when it receives the first SIGTERM.

Your environment

  • Version of the NGINX Wrapper: v0.0.1
  • Version of NGINX: nginx/1.19.0 (nginx-plus-r22)
  • Using NGINX or NGINX Plus: plus
  • Go version used to build: 1.15
  • OS and distribution: Linux/Ubuntu/18.04
  • Containerization or Virtualization environment: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions