MCPcopy Create free account
hub / github.com/apache/thrift / start_cppfilt

Function start_cppfilt

contrib/parse_profiling.py:261–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259
260
261def start_cppfilt():
262 (read_pipe, write_pipe) = os.pipe()
263
264 # Fork. Run c++filt in the parent process,
265 # and then continue normal processing in the child.
266 pid = os.fork()
267 if pid == 0:
268 # child
269 os.dup2(write_pipe, sys.stdout.fileno())
270 os.close(read_pipe)
271 os.close(write_pipe)
272 return
273 else:
274 # parent
275 os.dup2(read_pipe, sys.stdin.fileno())
276 os.close(read_pipe)
277 os.close(write_pipe)
278
279 cmd = ['c++filt']
280 os.execvp(cmd[0], cmd)
281
282
283def main(argv):

Callers 1

mainFunction · 0.85

Calls 2

filenoMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected