0

I have a program, I cannot change the code.

It calls some .so file's function, but don't delete the object in the end. When the owner of the program tries to update the program he kills it and send the update, but the .so file is in use so he can't update the file.

It's on an AIX platform.

Is it possible to force to kill the .so file? If I do a fuser -f on the file it returns nothing.

Can I create another program to kill the program, is there any command to do that?

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
demonofnight
  • 119
  • 1
  • 4
  • 1
    Tis called a reboot :) That's why system updates usually require restarting a machine. Even if you can replace the file on disk you can't replace it in memory on the fly. – Billy ONeal Feb 13 '12 at 18:23
  • i cannot reboot the machine –  Feb 13 '12 at 18:30
  • @BillyONeal: There is only one platform which requires restarts for updates. On most non MS platform there is no file locking or anything which would prevent changing a file on disk which is in use, the processes which have the file open simply get a private copy which is unlinked from the underlying filesystem if a open file is changed. To make use of the new file a restart of the process which uses the file is usually sufficient. –  Feb 13 '12 at 18:36
  • why can't he update the file when it is in use? – stew Feb 13 '12 at 19:02
  • @drhirsch, then perhaps you can explain that to Apple, who do require a reboot for many updates. Even a Safari update on a Mac frequently requires a reboot. – John Gardeniers Feb 13 '12 at 20:53
  • @drhirsch: Even on Linuxes, which usually can update without a reboot, the security fixes are not loaded into memory unless the machine is rebooted. (Or unless all the processes using a given .so are unloaded and reloaded) Nobody has figured out how to replace things in memory on the fly when processes are already using a given piece of code. – Billy ONeal Feb 14 '12 at 15:10

1 Answers1

1

It sounds like you need slibclean command, which unloads all shared libraries which are not used by a program - http://unix.derkeiler.com/Newsgroups/comp.unix.aix/2003-12/0316.html

Although I cannot say I fully understand the question.

kubanczyk
  • 13,812
  • 5
  • 41
  • 55