Kaydet (Commit) 3dc44aba authored tarafından Guido van Rossum's avatar Guido van Rossum

add debug, use waitpid

üst 82268e07
...@@ -47,7 +47,7 @@ SFPLAY = '/usr/sbin/sfplay' # Sound playing program ...@@ -47,7 +47,7 @@ SFPLAY = '/usr/sbin/sfplay' # Sound playing program
class struct: pass # Class to define featureless structures class struct: pass # Class to define featureless structures
G = struct() # oHlds writable global variables G = struct() # Holds writable global variables
# Main program # Main program
...@@ -83,6 +83,10 @@ def main(): ...@@ -83,6 +83,10 @@ def main():
elif optname == '-t': elif optname == '-t':
G.mode = optarg G.mode = optarg
# #
if G.debug:
for name in G.__dict__.keys():
print 'G.' + name, '=', `G.__dict__[name]`
#
if not args: if not args:
args = [DEF_DB] args = [DEF_DB]
# #
...@@ -149,7 +153,7 @@ def killchild(): ...@@ -149,7 +153,7 @@ def killchild():
waitchild(0) waitchild(0)
def waitchild(options): def waitchild(options):
pid, sts = os.wait(G.busy, options) pid, sts = os.waitpid(G.busy, options)
if pid == G.busy: if pid == G.busy:
G.busy = 0 G.busy = 0
G.stop.enable(0) G.stop.enable(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment