mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-23 09:56:02 +00:00
Revert "lib/drmtest: ducttape over fork race"
This reverts commit a031a1bf93b828585e7147f06145fc5030814547. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Conflicts: lib/drmtest.c Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
b34322fd15
commit
ab7cbf9737
@ -1129,7 +1129,6 @@ static void fork_helper_exit_handler(int sig)
|
|||||||
bool __igt_fork_helper(struct igt_helper_process *proc)
|
bool __igt_fork_helper(struct igt_helper_process *proc)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
sighandler_t oldsig;
|
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
assert(!proc->running);
|
assert(!proc->running);
|
||||||
@ -1140,13 +1139,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
|
|||||||
|
|
||||||
igt_install_exit_handler(fork_helper_exit_handler);
|
igt_install_exit_handler(fork_helper_exit_handler);
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX: There's a race between fork and the subsequent kill in
|
|
||||||
* igt_stop_signal_helper if we don't ovewrite the SIGQUIT handler. Note
|
|
||||||
* that inserting sufficient amounts of printf or other delays makes
|
|
||||||
* this unnecessary.
|
|
||||||
*/
|
|
||||||
oldsig = signal(SIGQUIT, SIG_DFL);
|
|
||||||
switch (pid = fork()) {
|
switch (pid = fork()) {
|
||||||
case -1:
|
case -1:
|
||||||
igt_assert(0);
|
igt_assert(0);
|
||||||
@ -1157,8 +1149,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
signal(SIGQUIT, oldsig);
|
|
||||||
|
|
||||||
proc->running = true;
|
proc->running = true;
|
||||||
proc->pid = pid;
|
proc->pid = pid;
|
||||||
proc->id = id;
|
proc->id = id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user