On Sat, 10 Jun 2006 19:18:56 +0200
Stefan Esser <[EMAIL PROTECTED]> 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/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to