[LTP] [PATCH v2 04/10] Rewrite sem_nstest.c using new LTP API

Cyril Hrubis chrubis@suse.cz
Thu Mar 10 16:54:51 CET 2022


Hi!
> +	ipc_id = semget(MY_KEY, 1, IPC_CREAT | IPC_EXCL | 0666);
> +	if (ipc_id < 0) {
> +		tst_res(TINFO, "Semaphore already exists");
> +		ipc_id = SAFE_SEMGET(MY_KEY, 1, 0);
>  	}
> +}

Same here, I do not think that we should blindly reuse existing
semaphore.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list