diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2015-06-01 19:20:25 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-06-01 23:03:11 -0700 |
commit | 6c53862ff1cc7ada37f76a2fdabf85f3c3ba40d9 (patch) | |
tree | e02fa145bf9756315111766627ef3f636776357b /env_universal_common.cpp | |
parent | c0cf25cf0b28969dd9ef821f7952f42783ed6720 (diff) |
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.
Diffstat (limited to 'env_universal_common.cpp')
-rw-r--r-- | env_universal_common.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/env_universal_common.cpp b/env_universal_common.cpp index a8d45bcd..f90cc82b 100644 --- a/env_universal_common.cpp +++ b/env_universal_common.cpp @@ -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 { |