Follow-up Comment #3, bug #60774 (project make):

i pushed a fix here
https://github.com/dgoncharov/make/tree/sv_60774_output_sync_deadlock.
This fix does the following.

Lock a temp file to synchronize output.

1. Lock a temp file, rather than stdout, to synchronize output.
Locking stdout prevents make from obtaining the lock when another process has
make's stdout locked. E.g make's stdout is redirected to /dev/null and another
process has /dev/null locked.

2. Pass the file descriptor of this lock file to children through env in
MAKEFLAGS' sync-mutex.

3. Check that a file can be locked before locking it.  With a temp file this
check in acquire_semaphore is not supposed to fail. It won't hurt though.

4. Print a warning message when cannot synchronize output.

Tested this fix on linux. Will be good if anybody could test this fix on
windows.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60774>

_______________________________________________
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/


  • [bug #60774] ... Mike Frysinger
    • [bug #60... Mike Frysinger
      • [bug... Dmitry Goncharov
        • ... Dmitry Goncharov
          • ... Dmitry Goncharov
            • ... Eli Zaretskii
              • ... David Boyce
                • ... Dmitry Goncharov via Bug reports and discussion for GNU make
                • ... David Boyce
                • ... Dmitry Goncharov via Bug reports and discussion for GNU make
                • ... Paul Smith
                • ... Dmitry Goncharov via Bug reports and discussion for GNU make
                • ... Paul Smith
                • ... Paul Smith

Reply via email to