On Mon, Nov 16, 2015 at 01:38:23PM +0000, Paul Moore wrote: > I don't know what Unix does, I suspect it retains an old > copy of the shared library for the process until the process exists, > in which case you'd see a different issue, that you do an upgrade, but > your process still uses the old code till you restart.
Basically. Technically, both Linux and Windows won't let you write to a shared library you have mapped into a process's address space for execution. (You get an -ETEXT error on Linux, which one can observer if one tries to re-create virtualenv while its bin/python is currently running.) What you can do Linux that you cannot do on Windows is delete a shared library file while it's mapped into a process's address space. Then Linux lets you create a new file with the same name, while the old file stays around, nameless, until it's no longer used, at which point the disk space gets garbage-collected. (If we can call reference counting "garbage collection".) The result is as you said: existing processes keep running the old code until you restart them. There are tools (based on lsof, AFAIU) that check for this situation and remind you to restart daemons. Marius Gedminas -- We like stress testing, because we know the future will be stressful. -- Maritza Mendez
signature.asc
Description: Digital signature
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig