You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the code interfaces/sem_timedwait/2-1.c, I always get the following output:
TEST FAILED
TEST PASSED
After my analysis, I found that this is due to the fact that the parent process and the child process are not
operating on the same mysemp, the mysemp of child process is just a copy of the mysemp of parent process
with the same name.
So this will result in the parent process not being able to complete the unlocking of the child process
via the sem_post operation, and the child process will print a FAILED message due to the timeout.
Is this the desired result of this test case, or do we actually want the parent and child processes to
operate the same semaphore?
The text was updated successfully, but these errors were encountered:
When I run the code interfaces/sem_timedwait/2-1.c, I always get the following output:
TEST FAILED
TEST PASSED
After my analysis, I found that this is due to the fact that the parent process and the child process are not
operating on the same mysemp, the mysemp of child process is just a copy of the mysemp of parent process
with the same name.
So this will result in the parent process not being able to complete the unlocking of the child process
via the sem_post operation, and the child process will print a FAILED message due to the timeout.
Is this the desired result of this test case, or do we actually want the parent and child processes to
operate the same semaphore?
The text was updated successfully, but these errors were encountered: