Ticket #66 (closed defect: fixed)
conf_tmp_file and conf_tmp_dir don't interact with conf_cleanExit
| Reported by: | blee | Owned by: | blee |
|---|---|---|---|
| Priority: | critical | Milestone: | confman-1.9.3 |
| Component: | confman | Version: | 1.9.2b |
| Keywords: | Cc: |
Change History
comment:1 Changed 2 years ago by blee
- Owner changed from confman-developers@… to blee
- Status changed from new to accepted
comment:2 Changed 2 years ago by blee
The interaction among conf_tmp_dir, $TMPFILES, and conf_cleanExit is not working as expected.
comment:3 Changed 2 years ago by blee
- Component changed from confsync to confman
- Summary changed from confsync tmp file leak when export fetch fails to conf_tmp_file and conf_tmp_dir don't interact with conf_cleanExit
Renaming summary to be more descriptive. This is a general problem that extends beyond confsync.
Subshells can't write to their parent's variables in a way that is visible to the parent, so conf_cleanExit always has an empty TMPFILES and the result is tmp file leaks.
comment:4 Changed 2 years ago by blee
(In [437]) Re-architect the way tmpfiles are created. All processes automatically
create a base temporary directory under which all subsequent tmpdirs and
tmpfiles are created. An EXIT trap is set to call conf_cleanExit in
confmancommon.sh, instead of every executable. Clean exits are now
performed by calling conf_cleanExit.
See #66
