From 2fe00262dc0d1627bc357bfcb8c683ed5372749e Mon Sep 17 00:00:00 2001 From: Eugene Leonovich Date: Sun, 23 Nov 2014 16:49:29 +0100 Subject: [PATCH] Remove a warning from msg_receive --- hphp/runtime/ext/ipc/ext_ipc.cpp | 5 +---- hphp/test/slow/ext_ipc/message_queue.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hphp/runtime/ext/ipc/ext_ipc.cpp b/hphp/runtime/ext/ipc/ext_ipc.cpp index fc695836fc834..c9864cc0aeae1 100644 --- a/hphp/runtime/ext/ipc/ext_ipc.cpp +++ b/hphp/runtime/ext/ipc/ext_ipc.cpp @@ -307,10 +307,7 @@ bool HHVM_FUNCTION(msg_receive, int result = msgrcv(q->id, buffer, maxsize, desiredmsgtype, realflags); if (result < 0) { - int err = errno; - raise_warning("Unable to receive message: %s", - folly::errnoStr(err).c_str()); - errorcode = err; + errorcode = errno; return false; } diff --git a/hphp/test/slow/ext_ipc/message_queue.php b/hphp/test/slow/ext_ipc/message_queue.php index de63504e54d0e..3a5c50535f388 100644 --- a/hphp/test/slow/ext_ipc/message_queue.php +++ b/hphp/test/slow/ext_ipc/message_queue.php @@ -29,7 +29,7 @@ var_dump($ret); var_dump(22 === $s_error_code); // 22 - invalid argument -$ret = @msg_receive($queue, 0, $type, 100, $msg, false, MSG_IPC_NOWAIT, $r_error_code); +$ret = msg_receive($queue, 0, $type, 100, $msg, false, MSG_IPC_NOWAIT, $r_error_code); var_dump($ret); var_dump(MSG_ENOMSG === $r_error_code);