]> sourceware.org Git - systemtap.git/commitdiff
Rename systemtap_exit to cleanup.
authorDave Brolley <brolley@redhat.com>
Fri, 10 Jul 2009 15:09:36 +0000 (11:09 -0400)
committerDave Brolley <brolley@redhat.com>
Fri, 10 Jul 2009 15:09:36 +0000 (11:09 -0400)
Allow shutdown_server to test $server_pid in order to determine whether we started a server.

testsuite/lib/systemtap.exp

index e04fe8375a12019c02dbd79ae33b463152d0d2c2..76fd57bd22be6957adaa5f04e42e3c73ad283c0a 100644 (file)
@@ -53,7 +53,7 @@ proc print_systemtap_version {} {
 
 
 proc setup_systemtap_environment {} {
-    global srcdir env
+    global srcdir env server_pid net_path
 
     # need an absolute SRCDIR for the top-level src/ tree
     # XXX: or, we could change nearby uses of ${SRCDIR}/testsuite to ${SRCDIR}
@@ -68,6 +68,8 @@ proc setup_systemtap_environment {} {
     set env(SYSTEMTAP_DIR) [exec pwd]/.systemtap-[exec whoami]
 
     # Find or start a systemtap server, if requested.
+    set net_path ""
+    set server_pid 0
     if {[use_server_p]} then {
        if {! [setup_server]} then {
            return 0
@@ -151,6 +153,7 @@ proc shutdown_server {} {
     if { $server_pid != 0 } then {
        print "Stopping the systemtap server with PID==$server_pid"
        exec stap-stop-server $server_pid
+       set server_pid 0
     }
 
     # Remove the temporary stap script
@@ -198,11 +201,9 @@ get_system_info
 proc systemtap_init {args} {}
 proc systemtap_version {} {}
 
-proc systemtap_exit {} {
+proc cleanup {} {
     # Stop the stap server, if we started it.
-    if {[use_server_p]} then {
-       shutdown_server
-    }
+    shutdown_server
 }
 
 
This page took 0.029577 seconds and 5 git commands to generate.