mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kio: suspend slaves to prevent data going in or out
that design flaw needs a proper fix but it will not happen until I rewrite everything job-related Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
053420e816
commit
da1448658a
1 changed files with 10 additions and 0 deletions
|
@ -131,10 +131,20 @@ bool SlaveInterface::isAlive() const
|
|||
void SlaveInterface::suspend()
|
||||
{
|
||||
m_connection->suspend();
|
||||
// TODO: this is not a proper way to suspend slaves (tho it works), e.g. for remote connections
|
||||
// a server may decide to just close the connection because there is no reponse from the slave
|
||||
// for some time but otherwise data keeps getting pumped in or out. for example it works for
|
||||
// file slave but not for the curl slave
|
||||
if (m_pid) {
|
||||
::kill(m_pid, SIGSTOP);
|
||||
}
|
||||
}
|
||||
|
||||
void SlaveInterface::resume()
|
||||
{
|
||||
if (m_pid) {
|
||||
::kill(m_pid, SIGCONT);
|
||||
}
|
||||
m_connection->resume();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue