Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!sco!natei From: natei@sco.COM (Nathaniel Ingersoll) Newsgroups: comp.unix.wizards Subject: Re: questions on dynamic linking on SunOS Message-ID: <3301@scolex.sco.COM> Date: 15 Sep 89 17:49:22 GMT References: Reply-To: natei@sco.COM (Nathaniel Ingersoll) Organization: The Santa Cruz Operation, Inc. Lines: 23 In article nieh@nnn.crd.ge.com writes: : : :This idea just came across to my mind. If it is feasible it would be :very useful. Before I even try it I would like to get some opinions. : :On SunOS 4.0, : : 1. run a C program which generates a C function, say xxx(...). : 2. fork a cc to compile it and to put it into the shareable library. : 3. back to the program and call it. (I think it's ok) : 4. generate a different version of xxx(...) : and compile it and put it back to the same shareable library. : 5. call it again. (what should happen? the old xxx(...) : or the new xxx(...) gets executed ?) : :Any comments ? This wouldn't work because you wouldn't be able to write to the shared library that your program includes, because it's currently loaded in memory (sort of like "Text file busy"). An analogy would be writing to the text file of your program and having that modify the data/text of your running program, which also doesn't work.