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

Support logrotate for xrdp and xrdp-sesman #3278

Open
neznajka97 opened this issue Oct 18, 2024 · 1 comment
Open

Support logrotate for xrdp and xrdp-sesman #3278

neznajka97 opened this issue Oct 18, 2024 · 1 comment

Comments

@neznajka97
Copy link

xrdp version

0.9.23.1

Detailed xrdp version, build options

Logrotate renames and compesses logging file. After that it removes or creates new.

xrdp-sesman after received HUP not created new log, only compare old and new logging file name.
Can you add code, that delete file descriptor to old removed file and crete/open new logging file. 

Operating system & version

Alt Linux

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

Xorg

What desktop environment do you use?

MATE

Environment xrdp running on

No response

What's your client?

No response

Area(s) with issue?

No response

Steps to reproduce

Open session. Wait for logrotate to rotate xrdp-sesman.log

✔️ Expected Behavior

New file and logs in it. Closed old file descriptor

❌ Actual Behavior

Whether the new file exists or not depends on the logrotate settings. The file descriptor for the old file exists, but the file no longer exists. Logs are not written to the new file.

Anything else?

No response

@neznajka97 neznajka97 added the bug label Oct 18, 2024
@matt335672
Copy link
Member

@neznajka97

I can see where you're coming from, but this isn't at all simple.

Both on the main log files are written by multiple processes. It's not just a question of closing a file and opening it - we'd need to synchronise access to the file from multiple processes, and we don't have all the plumbing in place to do that.

The workaround is to use syslog logging, which will stop the main log file growing.

I'll mark this as a feature request for now.

@matt335672 matt335672 changed the title Logrotate and xrdp-sesman interaction Support logrotate for xrdp and xrdp-sesman Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants