|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need a reliable file locked indicator?
Hello,
I'm developing a client-server prototype. I'm building the idea in DHTML/Perl on an Apache server running on a Windows XP Home machine. This is my client-server development environment. I'm writing a GUI to allow initial entry/update or browse to the data of a file X. In the entry/update mode, the process opens a surrogate file for the X file, and tries to get a file lock on that surrogate. If a lock is granted subroutines are called to read the X data in and display the GUI in update mode, else the same subroutines are called to show the GUI in browse (READONLY) mode. This structure follows. open(GI,$filnam); if (flock(GI, LOCK_EX||LOCK_NB)) { $pflg = "U"; # Update. &readdata; &shoGI; } else { $pflg = "B"; # Browse. &readdata; &shoGI; } I open 2 clients. I enter the GUI in update mode, after getting the lock on the server file, with client A. I then enter the GUI using client B, after again getting a lock, while still in that GUI in client A with the lock. Its as if the file was closed (which removes the lock) when I generated the GUI to client A. The flock checking is done on the server prior to showing the GUI to the client. The BACK key is used to exit the GUI. Any guidance on this or alternative suggestions for a reliable file locking indicator that is viable in this internet, client-server, browser based environment would be greatly appreciated. Thank you. Respectfully, CC3 |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Need a reliable file locked indicator? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|