Project

General

Profile

a.py

Igor Sfiligoi, 10/04/2012 04:08 PM

 
1
#!/usr/bin/python
2

    
3
import signal,os
4

    
5
def termsignal(signr,frame):
6
    raise KeyboardInterrupt, "Received signal %s"%signr
7

    
8
signal.signal(signal.SIGTERM,termsignal)
9
signal.signal(signal.SIGQUIT,termsignal)
10

    
11
import condorExe
12
print "%i start1"%os.getpid()
13
a=condorExe.exe_cmd("../../../../bin/sleep","3")
14
print os.getpid(), a 
15
print "%i end1"%os.getpid()