X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=acdc659879b42656f593ab6dbfc3ad83f36bc041;hp=fabc887b06c75c737e8eb49632f8bebe11e28c47;hb=0cfe20893afc994b3e105ea91a528f96af560199;hpb=ae3a5accfdbe1fbfde6ba4ab583887a7d3d779ac diff --git a/init.c b/init.c index fabc887b..acdc6598 100644 --- a/init.c +++ b/init.c @@ -356,9 +356,8 @@ static int setup_thread_area(void) perror("shmat"); return 1; } -#ifdef FIO_HAVE_SHM_ATTACH_REMOVED - shmctl(shm_id, IPC_RMID, NULL); -#endif + if (shm_attach_to_open_removed()) + shmctl(shm_id, IPC_RMID, NULL); #endif memset(threads, 0, max_jobs * sizeof(struct thread_data));