Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: precmd: write error: interrupted
- X-seq: zsh-users 17787
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: precmd: write error: interrupted
- Date: Fri, 26 Apr 2013 08:08:05 -0700
- In-reply-to: <klc2ah$jiv$1@ger.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <klbmnc$ieh$1@ger.gmane.org> <130425111646.ZM17258@torch.brasslantern.com> <klc2ah$jiv$1@ger.gmane.org>
On Apr 25, 10:05pm, Yuri D'Elia wrote:
}
} I actually tried to set SA_RESTART only when installing the handler for
} SIGWINCH when debugging [1]. It works in this case, but I'm not entirely
} sure it is side-effect free (is doing an ioctl on the tty safe while
} mid-write?).
}
} What other syscalls would be interrupted by SIGWINCH that shouldn't be
} restarted? Right now I cannot think of anything that SIGWINCH should
} interrupt.
I've been thinking about this, and the problem with using SA_RESTART is
twofold:
(1) [Minor] Some platforms don't have restartable syscalls, so this won't
work everywhere. But perhaps the intersection of non-restarable syscalls
and support for SIGWINCH is empty.
(2) [Potentially major] A user-defined trap can be installed for the
SIGWINCH signal. That means arbitrary shell code might execute during
handling of the signal, so all sorts of things might happen mid-write,
not just the default ioctls.
We're not especially POSIX-beholden but it would also be best if we can
preserve the POSIX rules governing trap handlers. There may not be any
conflict with that here, but it needs to be kept in mind.
} [1] interestingly enough, why "interact" is tested for the Sunos4 case?
I have a vague recollection that it has something to do with the way
STREAMS i/o drivers interoperate with terminals, but I could be entirely
wrong.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author