[clug] Recompile running program

Stephen Jenkin sjenkin at canb.auug.org.au
Tue Mar 8 22:10:27 GMT 2005


Tridge talked about his chess server at one CLUG meeting last year.
He can recompile & reload on-the-fly...

'Genstruct' is for Generate Structures - modelled on Perl Data Dumper.
You have to build a main program that calls the (dynamic) library that's
your real program. When the static main recieves a signal, calls
'genstruct' to serialise the internal data, unmaps & remaps the dynamic
library, reloads the serialised data & calls the dyanamic 'main' again.

Hope I got that right :-)

http://samba.org/ftp/unpacked/junkcode/genstruct/
and
http://samba.org/ftp/tridge/talks/junkcode.pdf [look for 'genstruct'

HTH
sj

On Tue, 8 Mar 2005, Joel Pearson wrote:

> Hey,
> 
> I was wondering if anyone remembers a talk at Linux conf 2004, where the 
> speaker recompiled a running program and told the program to load the new 
> code, and not drop any of the connections to it.
> 
> >From memory the speaker had a chess server and he was able to make some 
> changes to the chess server, recompile it and tell the running process to 
> reload itself.  And somehow managing to not drop any of the connections 
> (users) to the chess server.
> 
> I think the talk *may* have been the "A tour of my junkcode directory" talk 
> by Tridge, but I couldn't find any of the details of this talk.
> 
> It doesn't really matter if I don't find which talk it was.  A link to a 
> howto/article/whatever that talks about how to recompile running processes 
> is all I'm really looking for.
> 
> Thanks
> 
> -Joel 
> 
> 
> 
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
> 


Steve Jenkin, Unix Sys Admin
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA

sjenkin at canb.auug.org.au http://www.tip.net.au/~sjenkin




More information about the linux mailing list