sem_open不会建立文件,与根目录也没有什么关系。
下面是POSIX标准对sem_open的name参数的解释:
If name begins with the slash character, then processes calling sem_open() with the same value of name shall refer to the same semaphore object, as long as that name has not been removed. If name does not begin with the slash character, the effect is implementation-defined. The interpretation of slash characters other than the leading slash character in name is implementation-defined.