   // difficult.
   expectNotEqual(SEM_FAILED, sem2)
 
-  let res = sem_close(sem)
+  let res = sem_close(sem!)
   expectEqual(0, res)
 
   let res2 = sem_unlink(semaphoreName)

  let sem = sem_open(semaphoreName, O_CREAT | O_EXCL, 0o777, 1)
  expectNotEqual(SEM_FAILED, sem)

  let res = sem_close(sem)
  expectEqual(0, res)

  let res2 = sem_unlink(semaphoreName)

  expectEqual(SEM_FAILED, sem2)
  expectEqual(EEXIST, errno)

  let res = sem_close(sem!)
  expectEqual(0, res)

  let res2 = sem_unlink(semaphoreName)
