On Tue, 24 Jan 2006, Egmont Koblinger wrote:
> On Tue, Jan 24, 2006 at 12:29:23PM +0200, Pavel Tsekov wrote: > > > > write(1, "\33[0mcopy_reg.py\33[0m \33[0mi"..., 100) = 53 > > > > This strace is not convincing - i don't see calls failing with -1. > > No, no syscall is failing. You ask the kernel to write 100 bytes, and since > a signal interrupts it, it says "everything went find but I only wrote 53 > bytes". Then it's your job not to forget to write the remaining 47 bytes. If a system call is interrupted it returns -1 and sets errno to EINTR. > > after all we have SA_RESTART. > > I don't know what SA_RESTART is. If it means the partially succeeded write() > call is automatically restarted by the kernel to write the remaining bytes, > then of course using it could be a cleaner solution than my patch. Yes, that's what SA_RESTART is supposed to do. And it is used in MC when installing the SIGCHLD handler. I think that there is something else that goes wrong. Your analysis is incomplete. I'll try to understand what's happening. _______________________________________________ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
