Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Not a Bug
-
Affects Version/s: 10.6.4
-
Fix Version/s: N/A
-
Component/s: Server
-
Labels:
-
Environment:All
Description
Hi, developers, I found an inconsistent code in below code. The lock LOCK_sigwait could be relased and not released in below code, which is correct?
int sigwait(sigset_t *setp, int *sigp) |
{
|
...;
|
 |
pthread_mutex_lock(&LOCK_sigwait);
|
for (;;) |
{
|
...;
|
pthread_mutex_unlock(&LOCK_sigwait); // release the lock before return |
return 0; |
}
|
}
|
pthread_cond_wait(&COND_sigwait, &LOCK_sigwait);
|
}
|
return 0; // do not release the lock before return |
}
|
|