You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is best practice to not simply kill (with KILL signal) processes. The problem is that SIGKILL cannot be intercepted trapped and therefore can lead to dangling/zombie processes.
In my specific scenario I spawn three processes with the webServer command in the playwright config:
A fresh database instance using docker compose
The backend
The frontend
The docker compose is started through a little node script with childProcess.exec(). Now, when this node script is killed, the child process (docker compose) is still running, which leads to a zombie container. The same would happen if I ran the docker compose command directly as the webServer command, because docker compose also "expects" a SIGTERM and not a SIGKILL.
Global teardown is not an option here, because I want to give the developers the possibility to start the "webserver" manually before running and creating new tests. If I kill the server in the teardown it is always killed, no matter if it was started by playwright or by hand.
This whole thing was already tackled in the past but lead to unexpected behavior and the "fix" was reverted. See #18865. That means that the initial problem still remains unfixed.
The text was updated successfully, but these errors were encountered:
Referencing #18209.
It is best practice to not simply kill (with KILL signal) processes. The problem is that SIGKILL cannot be intercepted trapped and therefore can lead to dangling/zombie processes.
In my specific scenario I spawn three processes with the webServer command in the playwright config:
docker compose
The docker compose is started through a little node script with
childProcess.exec()
. Now, when this node script is killed, the child process (docker compose
) is still running, which leads to a zombie container. The same would happen if I ran thedocker compose
command directly as thewebServer
command, becausedocker compose
also "expects" a SIGTERM and not a SIGKILL.Global teardown is not an option here, because I want to give the developers the possibility to start the "webserver" manually before running and creating new tests. If I kill the server in the teardown it is always killed, no matter if it was started by playwright or by hand.
This whole thing was already tackled in the past but lead to unexpected behavior and the "fix" was reverted. See #18865. That means that the initial problem still remains unfixed.
The text was updated successfully, but these errors were encountered: