Source for file sem_remove_bug_test.php

Documentation is available at sem_remove_bug_test.php

  1. <?php
  2. // semaphore remove bug in standalone php only
  3. // reported on 18.3.2002 as #16144
  4.  
  5. $channel="schulhof";
  6. $channel_id=crc32($channel);
  7. print dechex($channel_id);
  8. print "<br>\n";
  9. $sem_id = sem_get($channel_id,1,0600);
  10. print "$sem_id got<br>\n";
  11. sem_acquire($sem_id);
  12. print "$sem_id acquired<br>\n";
  13. sem_release($sem_id);
  14. print "$sem_id released<br>\n";
  15. sem_remove($sem_id);
  16. print "$sem_id removed<br>\n";
  17. //request cleanup dumps core if semaphore is removed
  18. ?>

Documentation generated on Tue, 29 Jun 2004 14:42:43 +0200 by phpDocumentor 1.3.0RC3