Skip to content

tests: synchronize server logmsg() in Windows - #22454

Closed
jay wants to merge 2 commits into
curl:masterfrom
jay:winlock_logmsg
Closed

jay wants to merge 2 commits into
curl:masterfrom
jay:winlock_logmsg

Conversation

@jay

@jay jay commented Jul 31, 2026

Copy link
Copy Markdown
Member
  • Sync server logmsg() in Windows since the function may be called from multiple threads, ie the Window monitor or Console control handler.

Closes #xxxx

- Sync server logmsg() in Windows since the function may be called from
  multiple threads, ie the Window monitor or Console control handler.

Closes #xxxx
@jay jay added the Windows Windows-specific label Jul 31, 2026
@vszakats

vszakats commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Replied at #22045 (comment)

Do we want to use logmsg() from the exception handler so badly as to
jusfity introducing locks / crticial sections? To me fprintf() (or WriteFile()
even) seems sufficient to fix this.

edit: or is fprintf(strerr) not thread-safe?

@jay

jay commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Now that #22045 is landed do we still need this

@jay

jay commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Now that #22045 is landed do we still need this

To answer my own q it looks like no, the calls from both threads are WriteFile

@jay jay closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants