From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Si8hu-0004Kx-La for qemu-devel@nongnu.org; Fri, 22 Jun 2012 14:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Si8hs-0007yg-Oj for qemu-devel@nongnu.org; Fri, 22 Jun 2012 14:35:46 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:54413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Si8hs-0007yN-E4 for qemu-devel@nongnu.org; Fri, 22 Jun 2012 14:35:44 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2012 14:35:40 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 98CB138C8054 for ; Fri, 22 Jun 2012 14:35:26 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5MIZPYv35586062 for ; Fri, 22 Jun 2012 14:35:25 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5MIZNeo014019 for ; Fri, 22 Jun 2012 14:35:25 -0400 From: Corey Bryant Date: Fri, 22 Jun 2012 14:36:08 -0400 Message-Id: <1340390174-7493-2-git-send-email-coreyb@linux.vnet.ibm.com> In-Reply-To: <1340390174-7493-1-git-send-email-coreyb@linux.vnet.ibm.com> References: <1340390174-7493-1-git-send-email-coreyb@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v4 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, libvir-list@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, eblake@redhat.com This sets the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant --- v4 -This patch is new in v4 (eblake@redhat.com) qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index c2aaaee..f890113 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2263,7 +2263,7 @@ static ssize_t tcp_chr_recv(CharDriverState *chr, char *buf, size_t len) msg.msg_control = &msg_control; msg.msg_controllen = sizeof(msg_control); - ret = recvmsg(s->fd, &msg, 0); + ret = recvmsg(s->fd, &msg, MSG_CMSG_CLOEXEC); if (ret > 0 && s->is_unix) unix_process_msgfd(chr, &msg); -- 1.7.10.2