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

Description
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