Project

General

Profile

Actions

Bug #4792

closed

NFDC does not work when ran through popen

Added by Alexander Lane over 6 years ago. Updated 17 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
12/17/2018
Due date:
% Done:

0%

Estimated time:

Description

Using the given fixes for environment, I've written experiments utilizing popen for process management rather than cmd.
However, when NFDC is run through popen rather than cmd, the program appears to not actually perform the operations requested (not adding given faces/routes) When using cmd or the command line to run these same commands, code runs successfully, including use of popen for other programs in the former case.
Example code for reproduction has been provided.


Files

test.py (2.35 KB) test.py Alexander Lane, 12/17/2018 02:34 PM
Actions #1

Updated by Junxiao Shi about 6 years ago

You are missing 'communicate'. Without it, the process cannot write to stdout, and thus may be paused.

p = node.popen(..)
out, err = p.communicate()
exitCode = p.wait()

It's better to use node.pexec that encapsulates this logic.

Actions #2

Updated by Alexander Lane 17 days ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF