Added waitpid in create_man

This commit is contained in:
Anthony Scemama 2014-11-24 09:59:22 +01:00
parent c36ad7725b
commit 867f8b41ed
3 changed files with 8 additions and 4 deletions

View File

@ -250,7 +250,7 @@ command_line = CommandLine()
def print_options():
keys = options.keys()
keys.sort()
import subprocess, threading
import subprocess
for k in keys:
description = options[k][1]
p1 = subprocess.Popen(["fold", "-s", "-w", "40"],stdout=subprocess.PIPE,stdin=subprocess.PIPE)

View File

@ -139,14 +139,16 @@ def do_print_subroutines(sub):
def run():
import parsed_text
import os,sys
if os.fork() == 0:
pid1 = os.fork()
if pid1 == 0:
for v in variables.values():
do_print(v)
for s in subroutines.values():
do_print_subroutines(s)
sys.exit(0)
if os.fork() == 0:
pid2 = os.fork()
if pid2 == 0:
tags = []
l = variables.keys()
file = open("irpf90_entities","w")
@ -169,6 +171,9 @@ def run():
file.close()
sys.exit(0)
os.waitpid(pid1,0)
os.waitpid(pid2,0)
######################################################################
if __name__ == '__main__':
run()

View File

@ -100,7 +100,6 @@ def dimsize(x):
buffer = x.split(':')
if len(buffer) == 1:
return x
buffer = map(strip,buffer)
else:
assert len(buffer) == 2
size = ""