> > I would guess this is caused by the read() syscall
> > being interrupted by some kind of signal.
> > Any chances it is the SIGALRM used to run the timer
> > things in bochs/pc_system.cc ???
> 
> If so, wouldn't the right thing to do be simply to restart
> the system call ?  I didn't actually try that, I wasn't sure
> that was the correct way to handle an EINTR.

Yes, we specifically switched the automatic restart *off*, because
if it is on, the FMWRUNGUEST ioctl cannot be interrupted via Ctrl-C 
or timeout ;-)

This means unfortunately that all other sys calls will need to be
restarted manually as well (just a do ... while (error && errno == EINTR)
loop).

On second thought, now that we don't actually have a timeout handler
anymore, we might as well switch the SIGALRM handler back to automatic
restart (just set sg_act.sa_flags to SA_RESTART when installing the
handler).  Please make sure that the guest context is then correctly
saved/restored across the automatic restart (it should be, but you 
never know ...).

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to