File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import logging
2+ import os
23from signal import SIGTERM
34import sys
45import threading
1314
1415psutil = pytest .importorskip ("psutil" )
1516
17+ # gRPC is only safe to fork() if gRPC objects are created in the child after the fork. The tests do
18+ # the opposite: the pytest process spawns labgrid-client via pexpect (forkpty) while gRPC is
19+ # already initialized in it, so gRPC's pthread_atfork handler can lose a race and abort the child
20+ # before it execs. Set GRPC_ENABLE_FORK_SUPPORT=0 to disable the handler; the spawned clients
21+ # fork+exec and never reuse an inherited channel, so it is not needed anyway.
22+ # See also https://github.com/grpc/grpc/blob/master/doc/fork_support.md
23+ os .environ .setdefault ("GRPC_ENABLE_FORK_SUPPORT" , "0" )
24+
25+
1626@pytest .fixture (scope = "session" )
1727def curses_init ():
1828 """ curses only reads the terminfo DB once on the first import, so make
You can’t perform that action at this time.
0 commit comments