[Midnightbsd-cvs] [MidnightBSD/mports] c4eaf9: games/gnuchess: fix opening book build hang

Lucas Holt noreply at github.com
Tue May 26 08:49:49 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/mports
  Commit: c4eaf9164ef66b52da210bebba08ec52cf88eae3
      https://github.com/MidnightBSD/mports/commit/c4eaf9164ef66b52da210bebba08ec52cf88eae3
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M games/gnuchess/Makefile
    A games/gnuchess/files/patch-src_engine_protocol.cpp

  Log Message:
  -----------
  games/gnuchess: fix opening book build hang

The book-building step hung indefinitely because:
1. The engine's loop() used while(true) and never exited after pthread_cancel
   caused fgets() to return NULL, causing pthread_join() to block forever.
2. The --addbook invocation lacked stdin redirection, causing the input
   thread to block on the terminal after book building completed.
3. The gnuchess.ini path was wrong (src/ vs doc/).

Fix the engine loop via patch, use --addbook with </dev/null, and correct
the ini path.

AI-Assisted-by: Claude Sonnet 4.6 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list