IPC: remove the rekeying optimization for System V semaphores

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 <marten.nordheim@qt.io>
bb10
Thiago Macieira 2022-10-12 18:15:36 -07:00
parent b330f212a9
commit bdaf3c458c
1 changed files with 0 additions and 9 deletions

View File

@ -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;