summaryrefslogtreecommitdiffstats
path: root/build_tools/l7/larch0/cli/test.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-11-04 18:03:12 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-11-04 18:03:12 (GMT)
commit11ef4af01d6e197a54d0759e688ab5cbd336be4b (patch)
tree4d5207019c8089eee89ed07544d4e8b2a0df2cba /build_tools/l7/larch0/cli/test.py
parent9015d3a3f45be618245c8146ae6242662b21fa94 (diff)
downloadlinhes_dev-11ef4af01d6e197a54d0759e688ab5cbd336be4b.zip
remove l7 profile
Diffstat (limited to 'build_tools/l7/larch0/cli/test.py')
-rwxr-xr-xbuild_tools/l7/larch0/cli/test.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/build_tools/l7/larch0/cli/test.py b/build_tools/l7/larch0/cli/test.py
deleted file mode 100755
index 18e8067..0000000
--- a/build_tools/l7/larch0/cli/test.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-#
-# This is a little script for testing the dispatcher and termination of
-# subprocesses. It spawns several levels of itself, each instance just
-# outputs an incrementing count until it is terminated.
-
-import sys, os, time, signal
-
-try:
- import json as serialize
-except:
- import simplejson as serialize
-
-def out(text):
- sys.stdout.write(serialize.dumps(text) + '\n')
- sys.stdout.flush()
-
-def sigint(num, frame):
- """A handler for SIGINT. Tidy up properly and quit.
- """
- out("!>INTERRUPTED %d" % level)
- exit(1)
-signal.signal(signal.SIGINT, sigint)
-
-level = 3
-while level > 0:
- if os.fork():
- break
- time.sleep(1)
- level -= 1
-
-sys.stderr.write('%d: pid=%d ppid=%d pgrp=%d\n' % (level,
- os.getpid(), os.getppid(), os.getpgrp()))
-sys.stderr.flush()
-time.sleep(5)
-
-n = 0
-while True:
- n += 1
- out('--%d: %04d' % (level, n))
- time.sleep(4)
-