Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 853
    • Issues 853
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !3036

Clean up Windows Invalid Parameter Handler setup and fix fileutils test

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Chun-wei Fan requested to merge fix-fileutils-test into main Oct 31, 2022
  • Overview 18
  • Commits 5
  • Pipelines 9
  • Changes 7

Hi,

This MR attempts to fix issue #2800 (closed) since we need to tell the Windows CRT to not abort() the program when we try to use g_fsync() to check that the file descriptor is indeed invalidated, since the underlying _commit() call on Windows in g_fsync() does not otherwise like it when one calls it with an invalidated file descriptor, as in 1, since the Visual Studio 2005 CRT. In the same process, we also attempt to consolidate the code to setup the invalid parameter handler for gspawn-win32-helper.c, gmessages.c, and for fixing the test program, fileutils.c, by using two private APIs.

This will probably need to be expanded further for MSYS2 builds as they transition to use the UCRT, but checking for such cross-compiler builds is beyond my knowledge on the MSYS2 toolchain.

With blessings, thank you!

Edited Nov 01, 2022 by Chun-wei Fan
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-fileutils-test