Merge pull request #4279 from rgerhards/ompipe-fix-hup

ompipe bugfix: race during HUP
This commit is contained in:
Rainer Gerhards 2020-05-13 17:13:34 +02:00 committed by GitHub
commit 16e8b44c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,10 +412,12 @@ ENDparseSelectorAct
BEGINdoHUP
CODESTARTdoHUP
pthread_mutex_lock(&pData->mutWrite);
if(pData->fd != -1) {
close(pData->fd);
pData->fd = -1;
}
pthread_mutex_unlock(&pData->mutWrite);
ENDdoHUP