From:             tom at bitworks dot de
Operating system: Debian Linux Woody & Apache/1.3.
PHP version:      4.3.8
PHP Bug Type:     Filesystem function related
Bug description:  locking problem

Description:
------------
There seam to be several logical implementation faults, concerning flock()
and dio_open()

1.) Opening a file by the first process with
  $fh = dio_open($dateiname,O_RDWR + O_NONBLOCK ,0 );

  does not trigger a failure opening the file twice by an other 
  process with the same method

  You always get the ressource handle

2.) Opening the file twice, after having opened with upper 
    method, by the flock(..., LOCK_NB) function, causes a
    waiststate for the flock() process. 

That problem should be solved.

Remark:
Mandatory locking on LINUX only works, if You mount the volume with option
"mand" (-o mand) (missing Information in documentation)
Programs like vi nevertheless are able to override the "mandatory locking"
with the "x!" command. (only checked for a LINUX Debian Woody system)


Expected result:
----------------
Triggering a failure (return false)

Actual result:
--------------
Waiting for locking

-- 
Edit bug report at http://bugs.php.net/?id=29563&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29563&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29563&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29563&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29563&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29563&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29563&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29563&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29563&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29563&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29563&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29563&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29563&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29563&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29563&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29563&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29563&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29563&r=float

Reply via email to