From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29138 invoked by alias); 11 Jan 2016 16:40:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 29128 invoked by uid 89); 11 Jan 2016 16:40:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Jan 2016 16:40:54 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id E78189134D; Mon, 11 Jan 2016 16:40:52 +0000 (UTC) Received: from blade.nx (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0BGepWc009555; Mon, 11 Jan 2016 11:40:52 -0500 Received: by blade.nx (Postfix, from userid 1000) id ABA572659EB; Mon, 11 Jan 2016 16:40:50 +0000 (GMT) Date: Mon, 11 Jan 2016 16:40:00 -0000 From: Gary Benson To: Yao Qi Cc: gdb-patches@sourceware.org, Eli Zaretskii , Pedro Alves , Doug Evans , Iago =?iso-8859-1?Q?L=F3pez?= Galeiras Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] Message-ID: <20160111164050.GA4285@blade.nx> References: <1429186791-6867-1-git-send-email-gbenson@redhat.com> <1430395542-16017-3-git-send-email-gbenson@redhat.com> <86si28wdlh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86si28wdlh.fsf@gmail.com> X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00180.txt.bz2 Hi Yao, Yao Qi wrote: > Gary Benson writes: > > +/* Return an object representing the mount namespace helper process. > > + If no mount namespace helper process has been started then start > > + one. Return NULL if no mount namespace helper process could be > > + started. */ > > + > > +static struct linux_mnsh * > > +linux_mntns_get_helper (void) > > +{ > > + static struct linux_mnsh *helper = NULL; > > + > > + if (helper == NULL) > > + { > > + static struct linux_mnsh h; > > + struct linux_ns *ns; > > + pid_t helper_creator = getpid (); > > + int sv[2]; > > + > > + ns = linux_ns_get_namespace (LINUX_NS_MNT); > > + if (ns == NULL) > > + return NULL; > > + > > + if (gdb_socketpair_cloexec (AF_UNIX, SOCK_STREAM, 0, sv) < 0) > > + return NULL; > > + > > + h.pid = fork (); > > + if (h.pid < 0) > > Function fork isn't available on uclinux target, so it causes a > compilation error like this below. Since my work touches > linux-bfin-low.c, I build GDBserver for bfin-uclinux, and the error > is found. [snip] > I don't know much about linux namespace stuff, so I didn't give a > fix here. Could you have a look? It probably needs a configure check, I'll add one. Cheers, Gary -- http://gbenson.net/