Mailinglist Archive: opensuse-factory (487 mails)

< Previous Next >
[opensuse-factory] Watch out PHP changes
  • From: Cristian Rodríguez <crrodriguez@xxxxxxxxxxxx>
  • Date: Wed, 12 May 2010 12:58:48 -0400
  • Message-id: <4BEADE48.5020008@xxxxxxxxxxxx>

In the next security updates as well in openSUSE factory PHP no longer
release the lock of previously locked files, neither automagically at
shutdown nor at stream closing so (broken) code like:


$fp = fopen('foo.txt','wb');
flock($fp, LOCK_EX);
/* write or do whatever with the locked file... */

Will no longer "unlock" the file in question.

This is an upstream change to provide a sane/correct behaviour from now
on but it might cause subtle issues.

So, you have to explicetely flock($fp,LOCK_UN); before closing the file.

Just keep an eye on this.


To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages