sem_unlink: return ENOENT when the named semaphore does not exist.

Follow posix, return ENOENT when the named semaphore does not
exist to fix the ltp open posix sem_unlink 4-1.c test problem.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
wangbowen6 2023-01-09 12:16:45 +08:00 committed by Xiang Xiao
parent e0f99d93ac
commit a491d07061

View File

@ -97,7 +97,7 @@ int sem_unlink(FAR const char *name)
if (!INODE_IS_NAMEDSEM(inode))
{
errcode = ENXIO;
errcode = ENOENT;
goto errout_with_inode;
}