Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution : "rotating_file_sink: failed renaming: permission denied " #3091

Open
hahanonym opened this issue May 17, 2024 · 2 comments
Open

Comments

@hahanonym
Copy link

on windows system , sub process will inherit "Handles" default (same as linux).
but win not allow rename file during occupied by sub process。
if i use rotate-sink ,will trigger permission denied error.
so , need change open mode to "ab+N" on windows
N means "_O_NOINHERIT by default in the _MSC_VER"

ref : [https://github.com/apache/arrow/pull/3085]

sorry for my pool English.

@tt4g
Copy link
Contributor

tt4g commented May 17, 2024

Pull Request is welcome.

@99neerajsharma
Copy link

Thanks @hahanonym. In my case, I was creating a subprocess using the CreateProcessA function. I modified the function call's 5th argument ([in] BOOL bInheritHandles) to false and the parent process could rename the log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants