|
| From: | Dmitry Goncharov |
| Subject: | [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null |
| Date: | Sat, 24 Jul 2021 10:54:51 -0400 (EDT) |
| User-agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36 |
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/
| [Prev in Thread] | Current Thread | [Next in Thread] |