Skip to content

Replace the signal test protocol with a file-based one

Stefano Rivera requested to merge task-test-crash into devel

For compatibility with pytest-xdist, replace the SIGUSR1 signal-based readiness protocol with a write to PID file. Signals were convenient, because we could wait for them to be delivered, efficiently. Under pytest-xdist there is a separate thread that we have no control over, that could win a race to receive our signal, crashing the xdist worker.

Waiting on file contents is equally performant (we can use select() to wait for the file to be written to) and much more thread-safe.

Fixes: #1065 (closed)

Merge request reports

Loading