示例#1
0
 def does_stuff():
     rsignal.pypysig_setflag(signal.SIGUSR1)
     os.kill(os.getpid(), signal.SIGUSR1)
     rsignal.pypysig_ignore(signal.SIGUSR1)
     while True:
         n = rsignal.pypysig_poll()
         if n < 0 or n == signal.SIGUSR1:
             break
     return n
示例#2
0
 def does_stuff():
     rsignal.pypysig_setflag(signal.SIGUSR1)
     os.kill(os.getpid(), signal.SIGUSR1)
     rsignal.pypysig_ignore(signal.SIGUSR1)
     while True:
         n = rsignal.pypysig_poll()
         if n < 0 or n == signal.SIGUSR1:
             break
     return n
示例#3
0
 def does_stuff():
     os.setpgid(0, 0)  # become its own separated process group
     rsignal.pypysig_setflag(signal.SIGUSR1)
     os.killpg(os.getpgrp(), signal.SIGUSR1)
     rsignal.pypysig_ignore(signal.SIGUSR1)
     while True:
         n = rsignal.pypysig_poll()
         if n < 0 or n == signal.SIGUSR1:
             break
     return n
示例#4
0
 def does_stuff():
     os.setpgid(0, 0)     # become its own separated process group
     rsignal.pypysig_setflag(signal.SIGUSR1)
     os.killpg(os.getpgrp(), signal.SIGUSR1)
     rsignal.pypysig_ignore(signal.SIGUSR1)
     while True:
         n = rsignal.pypysig_poll()
         if n < 0 or n == signal.SIGUSR1:
             break
     return n
示例#5
0
 def check_sigusr(self, s_frame):
     poll = rsignal.pypysig_poll()
     if poll == rsignal.SIGUSR1:
         print s_frame.print_stack()
示例#6
0
def check(expected):
    res = rsignal.pypysig_poll()
    os.write(1, "poll() => %d, expected %d\n" % (res, expected))
    assert res == expected
示例#7
0
 def check_sigusr(self, s_frame):
     poll = rsignal.pypysig_poll()
     if poll == rsignal.SIGUSR1:
         print s_frame.print_stack()
示例#8
0
def check(expected):
    res = rsignal.pypysig_poll()
    os.write(1, "poll() => %d, expected %d\n" % (res, expected))
    assert res == expected