Hello everybody!
This is my first post, so first of all I want to say a giant "Thank you!" to the community of stackoverflow for all the time an answer did the trick for me :)
I have a problem while dealing with python's inheritance.
I have a parent class which contains the following code:
def start(self):
pid = os.fork()
if (pid==0):
self.__do_in_forked_process()
elif(pid > 0):
self.__do_in_parent_process()
else:
print ("Error while forking...")
sys.exit(1)
The __do_in_forked_process() method contains a method self.__manage_request()
which is defined in the parent class and overridden in the child class.
In the child class, when I use use the method self.start()
the problem arise: the self.__manage_request() method executed is the one defined in the parent class instead of the method define in the child class (even if, I suppose, when I do self.start() the start method and all the things inside it should refer to the child object instead of to the parent object).
Thanks in advance!
turkishweb