python - os.fork(): Share local variable with parent -
i have written simple webserver script in python (for linux), creates new child process each http(s) connection receives os.fork()
. child changes values of various local variables. when child dies, local variables (logically) not set new value in parent , therefore following child processes.
one approach came with, make child new parent spawns other children, not work if have many parallel working children.
how achieve share new values between child , parent , following children? possible use ipc? if yes, have create new socket?
Comments
Post a Comment