From bdaf3c458ce1ed497caa10ccc6a0b819fd3c32a7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 12 Oct 2022 18:15:36 -0700 Subject: [PATCH] IPC: remove the rekeying optimization for System V semaphores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's hard to maintain it with multiple backends and I don't see the need for it. Change-Id: I12a088d1ae424825abd3fffd171d7bf6bbdf9a99 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/ipc/qsystemsemaphore.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/corelib/ipc/qsystemsemaphore.cpp b/src/corelib/ipc/qsystemsemaphore.cpp index a5c236824f..f7a9946ecd 100644 --- a/src/corelib/ipc/qsystemsemaphore.cpp +++ b/src/corelib/ipc/qsystemsemaphore.cpp @@ -186,15 +186,6 @@ void QSystemSemaphore::setNativeKey(const QNativeIpcKey &key, int initialValue, } d->clearError(); -#if !defined(Q_OS_WIN) && !defined(QT_POSIX_IPC) - // optimization to not destroy/create the file & semaphore - if (key == d->nativeKey && mode == Create && d->backend.createdSemaphore && d->backend.createdFile) { - d->initialValue = initialValue; - d->backend.unix_key = -1; - d->handle(mode); - return; - } -#endif d->cleanHandle(); d->nativeKey = key; d->initialValue = initialValue;