Skip to content

util: close the profiler's csv.gz with gzclose on every host (#874) - #2016

Merged
zackees merged 2 commits into
masterfrom
infra/874-platform-facade
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/874-platform-facade

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Refs #874

profiler_snapshot_dump_csv_gz closed its file with gzclose_w on Windows and gzclose elsewhere. zlib's gzclose calls gzclose_w for a write handle on every platform, so the branch does nothing. This PR uses gzclose(gz) everywhere. It removes 1 of the 7 conditionals; the ratchet baseline for profiler-io.c.h goes from 2 to 1.

  • RED ci/test_libobs_util_facade.py (new, auto-discovered by ./lint) fails on master because gzclose_w is present.
  • GREEN the branch is removed, and the test and ./lint pass.

Not in this PR:

  • The remaining gzopen_w branch.
  • The 5 conditionals in platform-file.c.h.

The C oracle compiles platform-file.c.h and profiler-io.c.h on their own, with oracle_ renames (rust/obs-c-oracle/oracle/platform.c). Moving those bodies into platform-nix.c.h / platform-windows.c.h means re-plumbing the POSIX and Windows oracle units too. That move goes in its own PR, with a Windows run.

@zackees
zackees enabled auto-merge October 24, 2026 00:39
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit b55301b Oct 24, 2026
31 checks passed
@zackees
zackees deleted the infra/874-platform-facade branch October 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant