예제 #1
0
 def does_stuff():
     interp_signal.pypysig_setflag(signal.SIGUSR1)
     os.killpg(os.getpgrp(), signal.SIGUSR1)
     interp_signal.pypysig_ignore(signal.SIGUSR1)
     while True:
         n = interp_signal.pypysig_poll()
         if n < 0 or n == signal.SIGUSR1:
             break
     return n
예제 #2
0
def test_simple():
    import os
    check(-1)
    check(-1)
    for i in range(3):
        interp_signal.pypysig_setflag(interp_signal.SIGUSR1)
        os.kill(os.getpid(), interp_signal.SIGUSR1)
        check(interp_signal.SIGUSR1)
        check(-1)
        check(-1)

    interp_signal.pypysig_ignore(interp_signal.SIGUSR1)
    os.kill(os.getpid(), interp_signal.SIGUSR1)
    check(-1)
    check(-1)

    interp_signal.pypysig_default(interp_signal.SIGUSR1)
    check(-1)
예제 #3
0
def test_simple():
    import os
    check(-1)
    check(-1)
    for i in range(3):
        interp_signal.pypysig_setflag(interp_signal.SIGUSR1)
        os.kill(os.getpid(), interp_signal.SIGUSR1)
        check(interp_signal.SIGUSR1)
        check(-1)
        check(-1)

    interp_signal.pypysig_ignore(interp_signal.SIGUSR1)
    os.kill(os.getpid(), interp_signal.SIGUSR1)
    check(-1)
    check(-1)

    interp_signal.pypysig_default(interp_signal.SIGUSR1)
    check(-1)