kernel: cannot interrupt segmentio commands
once we submit a command to segmentio process, we have to wait for it to complete even if we got interrupted.
This commit is contained in:
parent
39cf6b34e3
commit
ef647a54c0
1 changed files with 3 additions and 0 deletions
|
@ -799,8 +799,11 @@ docmd(Segio *sio, int cmd)
|
||||||
{
|
{
|
||||||
sio->err = nil;
|
sio->err = nil;
|
||||||
sio->cmd = cmd;
|
sio->cmd = cmd;
|
||||||
|
while(waserror())
|
||||||
|
;
|
||||||
wakeup(&sio->cmdwait);
|
wakeup(&sio->cmdwait);
|
||||||
sleep(&sio->replywait, cmddone, sio);
|
sleep(&sio->replywait, cmddone, sio);
|
||||||
|
poperror();
|
||||||
if(sio->err != nil)
|
if(sio->err != nil)
|
||||||
error(sio->err);
|
error(sio->err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue