Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
edit 2022-03-04: No longer draft.
This series of commits fixes #1729 and may also address reports of other session ending problems (e.g. #2021).
The "self-pipe trick" [Stevens 1992] is used to keep the processing performed in all signal handlers to a minimum. This is really simple to do in xrdp by using
g_set_wait_obj()
and related calls.As a result, SIGPIPE and SIGHUP are now processed from the sesman main loop, like all other events.
Other problems with SIGHUP processing have been addressed:-
This series of 4 commits addresses these issues as follows:-
extern
. This commit moves these declarations intosesman.h
struct log_config
contains a few members which are not always needed. For example, theper_logger_level
member is only used for debug builds. This commit makes these members (and associated code) conditional.log_start()
call is change from a booleandump_on_start
to a more genericflags
field. One of the new flags isLOG_START_DUMP_CONFIG
, which provides the existingdump_on_start
functionality. The other one,LOG_START_RESTART
allows for logging to be restarted smoothly. Existing log files are left untouched by a restart, even if the name changes.g_set_wait_obj()
. No significant processing is done in the signal handlers.log_start()
withLOG_START_RESTART
, and allows the user to change the listening port dynamically.