Re: subshell output swallowed (patch)
- From: Pavel Tsekov <ptsekov gmx net>
- To: Egmont Koblinger <egmont uhulinux hu>
- Cc: mc-devel gnome org
- Subject: Re: subshell output swallowed (patch)
- Date: Tue, 24 Jan 2006 14:24:40 +0200
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]