bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] retry opening startup files on EINTR


From: Chet Ramey
Subject: Re: [PATCH] retry opening startup files on EINTR
Date: Mon, 19 Feb 2024 17:10:53 -0500
User-agent: Mozilla Thunderbird

On 2/7/24 1:33 AM, Grisha Levit wrote:
I have some dotfiles symlinked to storage backed by a macOS File
Provider extension (e.g. Dropbox):

     $ realpath ~/.bash_profile
     /Users/levit/Library/CloudStorage/Dropbox/profile/.bash_profile

This normally works fine, except when my terminal emulator (tested
both Terminal.app and iTerm) restores sessions after being restarted
-- opening the startup file fails in about half of the restored
sessions, which ends up looking like:

     [Restored Feb 7, 2024 at 00:11:37]
     Last login: Wed Feb  7 00:11:37 on ttys008
     Restored session: Wed Feb  7 00:11:27 EST 2024
     -bash: /Users/levit/.bash_profile: Interrupted system call
     mbp:~ levit$

If I remove ~/.bash_profile, and make ~/.inputrc and ~/.bash_history
similar symlinks, I see the same issue with loading them (without an
error message).

I'm not sure what the underlying cause is here, but maybe it would be
appropriate to retry open(2) calls for these files if they fail with
EINTR?

What's the underlying signal here? I hope it's not SIGINT.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]