Re: Extension Installer Catch 22

From: Date: Sat, 10 Jun 2006 18:14:44 +0000
Subject: Re: Extension Installer Catch 22
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-24082@lists.php.net to get a copy of this message
On Sat, 10 Jun 2006 19:18:56 +0200 Stefan Esser <sesser@php.net> wrote: > Hello Michael, > > I'm writing an extension installer. I want to write the installer in > > PHP. This presents a problem if the extension was previously installed and > > is automatically being loaded because it can segfault after overwriting > > the .so module file. > > > > IIRC, the correct way to replace .so files is to unlink() them first and > then write the new file into place. Bingo. That works perfectly. So 'copy' truncates. If you 'unlink' first you get a new inode and I guess the old module is copy-on-write'd. Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/

« previous php.internals (#24082) next »