Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ec45bb

Browse files
committed
Consistently allow reading of messages from a detached shm_mq.
This was intended to work always, but the previous code only allowedit if at least one message was successfully read by the receiverbefore the sender detached the queue.Report by Petr Jelinek. Patch by me.
1 parent2d00190 commit5ec45bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/storage/ipc/shm_mq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ shm_mq_receive(shm_mq_handle *mqh, Size *nbytesp, void **datap, bool nowait)
406406
if (shm_mq_get_sender(mq)==NULL)
407407
returnSHM_MQ_WOULD_BLOCK;
408408
}
409-
elseif (!shm_mq_wait_internal(mq,&mq->mq_sender,mqh->mqh_handle))
409+
elseif (!shm_mq_wait_internal(mq,&mq->mq_sender,mqh->mqh_handle)
410+
&&shm_mq_get_sender(mq)==NULL)
410411
{
411412
mq->mq_detached= true;
412413
returnSHM_MQ_DETACHED;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp