mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Suppress uvar error messages due to permissions or file not found
su does not reset XDG_RUNTIME_DIR, which means that XDG_RUNTIME_DIR may point to directories that the user does not have permission to access. Similarly there is no guarantee that XDG_RUNTIME_DIR points to a directory that actually exists. Rather than try to handle these issues, we simply ignore them, effectively disabling realtime uvar notifications. Fixes #1955.
This commit is contained in:
parent
c0cf25cf0b
commit
6c53862ff1
1 changed files with 7 additions and 1 deletions
|
@ -1376,7 +1376,13 @@ class universal_notifier_named_pipe_t : public universal_notifier_t
|
|||
{
|
||||
// Maybe open failed, maybe mkfifo failed
|
||||
int err = errno;
|
||||
report_error(err, L"Unable to make or open a FIFO for universal variables with path '%ls'", vars_path.c_str());
|
||||
// We explicitly do NOT report an error for ENOENT or EACCESS
|
||||
// This works around #1955, where $XDG_RUNTIME_DIR may get a bogus value under suc
|
||||
if (err != ENOENT && err != EPERM)
|
||||
{
|
||||
report_error(err, L"Unable to make or open a FIFO for universal variables with path '%ls'", vars_path.c_str());
|
||||
}
|
||||
pipe_fd= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue