[ovs-discuss] Using popen() or system() calls from inside openvswitch source code
blp at nicira.com
Wed Apr 15 18:23:32 UTC 2015
It's probably best to just use the existing code in ovs-vswitchd to
access the database.
On Wed, Apr 15, 2015 at 10:11:39AM +0500, david jhon wrote:
> Thanks a lot for your reply.
> I am trying to add some records in ovsdb table based on upcall handling in
> userspace. After digging little more, I came to know that it uses POSIX
> message queues for Inter Process Communication and I should better go this
> way. Thank you!
> On Wed, Apr 15, 2015 at 2:51 AM, Ben Pfaff <blp at nicira.com> wrote:
> > On Mon, Apr 13, 2015 at 12:01:25PM +0500, david jhon wrote:
> > > I want to run a command from inside openvswitch code from
> > > ofproto/ofproto-dpif-xlate.c. with popen(), openvswitch compiles and runs
> > > successfully but it does not run command.
> > >
> > > With system(), openvswitch fails to compile with following error:
> > >
> > > blacklisted due to thread safety issues. I tried running system command
> > > with ovs_mutex lock and unlock routines, but it makes no difference.
> > >
> > > Please let me know what am I doing wrong here. How could a linux command
> > be
> > > run from openvswitch. Your help/guidance in this regard will be highly
> > > valuable and appreciated.
> > It's probably a bad idea to do this. The error is because POSIX says
> > that system() need not be thread safe.
> > There may be a better way to accomplish what you're trying to do.
> > What are you trying to do?
More information about the discuss