[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] retry opening startup files on EINTR
From: |
Grisha Levit |
Subject: |
Re: [PATCH] retry opening startup files on EINTR |
Date: |
Tue, 20 Feb 2024 11:37:54 -0500 |
On Tue, Feb 20, 2024 at 9:18 AM Chet Ramey <chet.ramey@case.edu> wrote:
>
> Well, depending on when the terminal emulator sends the SIGWINCH, this is
> probably a bug in Dropbox or the File Provider code. Bash installs its
> SIGWINCH handler with SA_RESTART, and the default disposition is to
> discard, so even if a SIGWINCH arrives before bash installs its handler it
> should not interrupt open().
>
> I suppose we'll have to work around it.
sigaction(2) says:
The affected system calls include open(2), read(2), write(2),
sendto(2), recvfrom(2), sendmsg(2) and recvmsg(2) on a communications
channel or a slow device (such as a terminal, but not a regular file)
so I guess a SIGWINCH during the open(2) for ~/.bash_profile, etc. can
still get interrupted.