MCPcopy Create free account
hub / github.com/mininet/mininet / pexec

Method pexec

mininet/node.py:425–433  ·  view source on GitHub ↗

Execute a command using popen returns: out, err, exitcode

( self, *args, **kwargs )

Source from the content-addressed store, hash-verified

423 return popen
424
425 def pexec( self, *args, **kwargs ):
426 """Execute a command using popen
427 returns: out, err, exitcode"""
428 popen = self.popen( *args, stdin=PIPE, stdout=PIPE, stderr=PIPE,
429 **kwargs )
430 # Warning: this can fail with large numbers of fds!
431 out, err = popen.communicate()
432 exitcode = popen.wait()
433 return decode( out ), decode( err ), exitcode
434
435 # Interface management, configuration, and routing
436

Callers 2

updateIPMethod · 0.80
statusMethod · 0.80

Calls 2

popenMethod · 0.95
decodeFunction · 0.90

Tested by

no test coverage detected