mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #7492: Autoconf tests were leaving semaphore files behind. Add
sem_unlink calls to delete those semaphore files.
This commit is contained in:
parent
aef189939e
commit
59dc89e87d
2 changed files with 7 additions and 3 deletions
6
configure
vendored
6
configure
vendored
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Revision: 76636 .
|
# From configure.in Revision: 76644 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for python 2.7.
|
# Generated by GNU Autoconf 2.61 for python 2.7.
|
||||||
#
|
#
|
||||||
|
@ -24474,6 +24474,7 @@ int main(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
sem_close(a);
|
sem_close(a);
|
||||||
|
sem_unlink("/autoconf");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24548,7 +24549,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int main(void){
|
int main(void){
|
||||||
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
|
sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
|
||||||
int count;
|
int count;
|
||||||
int res;
|
int res;
|
||||||
if(a==SEM_FAILED){
|
if(a==SEM_FAILED){
|
||||||
|
@ -24558,6 +24559,7 @@ int main(void){
|
||||||
}
|
}
|
||||||
res = sem_getvalue(a, &count);
|
res = sem_getvalue(a, &count);
|
||||||
sem_close(a);
|
sem_close(a);
|
||||||
|
sem_unlink("/autocftw");
|
||||||
return res==-1 ? 1 : 0;
|
return res==-1 ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3455,6 +3455,7 @@ int main(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
sem_close(a);
|
sem_close(a);
|
||||||
|
sem_unlink("/autoconf");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
], ac_cv_posix_semaphores_enabled=yes,
|
], ac_cv_posix_semaphores_enabled=yes,
|
||||||
|
@ -3479,7 +3480,7 @@ AC_TRY_RUN([
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int main(void){
|
int main(void){
|
||||||
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
|
sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
|
||||||
int count;
|
int count;
|
||||||
int res;
|
int res;
|
||||||
if(a==SEM_FAILED){
|
if(a==SEM_FAILED){
|
||||||
|
@ -3489,6 +3490,7 @@ int main(void){
|
||||||
}
|
}
|
||||||
res = sem_getvalue(a, &count);
|
res = sem_getvalue(a, &count);
|
||||||
sem_close(a);
|
sem_close(a);
|
||||||
|
sem_unlink("/autocftw");
|
||||||
return res==-1 ? 1 : 0;
|
return res==-1 ? 1 : 0;
|
||||||
}
|
}
|
||||||
], ac_cv_broken_sem_getvalue=no,
|
], ac_cv_broken_sem_getvalue=no,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue