fixed: race condition
This commit is contained in:
parent
abbe6b2b38
commit
c35c5d3ca9
1 changed files with 3 additions and 3 deletions
|
@ -156,10 +156,10 @@ void CAmpSwitch::Process()
|
||||||
printf("switching off, executing \"%s\"\n", m_offcommand);
|
printf("switching off, executing \"%s\"\n", m_offcommand);
|
||||||
system(m_offcommand);
|
system(m_offcommand);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t byte;
|
uint8_t byte;
|
||||||
while (read(m_pipe[0], &byte, 1) == 1);
|
while (read(m_pipe[0], &byte, 1) == 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue