Closed 0x41gawor closed 1 year ago
Doesn't work I mean - when I click the ctrl+z
with my pox component on the console running nothing happends. Same was with SIGWINCH and SIGINT.
I think you should try a simpler test; this seems to work fine for me. I'm also using the latest POX under Python 3 and it looks like you may be quite a bit out of date.
Minimal example on top of POX halosaur which seems to work as expected:
from pox.core import core
import signal
log = core.getLogger()
def ctrl_z_handler (signum, frame):
log.warn("Ctrl-Z!")
def launch ():
signal.signal(signal.SIGTSTP, ctrl_z_handler)
log.warn("Launched")
Running the component and pressing Ctrl-Z twice followed by Ctrl-C:
[pox]$ ./pox.py log.level --DEBUG ctrlz
POX 0.8.0 (halosaur) / Copyright 2011-2022 James McCauley, et al.
WARNING:ctrlz:Launched
DEBUG:boot:Not launching of_01
DEBUG:core:POX 0.8.0 (halosaur) going up...
DEBUG:core:Running on CPython (3.10.6/Mar 10 2023 10:55:28)
DEBUG:core:Platform is Linux-5.15.0-60-generic-x86_64-with-glibc2.35
INFO:core:POX 0.8.0 (halosaur) is up.
^ZWARNING:ctrlz:Ctrl-Z!
^ZWARNING:ctrlz:Ctrl-Z!
^CINFO:core:Going down...
INFO:core:Down.
The following snippet of my controller code does not work
Do you maybe know the possible reason for such issue?