Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.Prune svn:mergeinfo from the new branch, as nothing has been mergedhere.Additional commits post-branch will follow.Approved by: re (implicit)Sponsored by: The FreeBSD Foundation
sem: Don't free nameinfo that is still in list when open() fails.This bug could be reproduced easily by calling sem_open() with O_CREAT |O_EXCL on a semaphore that is already open in the process. The structsem_nameinfo would be freed while still in sem_list and later calls tosem_open() or sem_close() could access freed memory.PR: 206396MFC after: 5 days
Remove dot at the end of errx() message.Noted by: bdeMFC after: 3 days
Adjust style, fix typo, do not print errno because it is meaningless there.This test fails for now.MFC after: 3 days
Don't forget to use fourth argument if O_CREAT is set in argument oflag.The fourth specifies initial value for the semaphore.
Add test code for POSIX semaphore implementation.