Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a detached process running on a VAX 4000 using OpenVMS 5.4-2. The process uses system service sys$enqw to lock access to a file while it updates it. It the uses sys$deq to release to lock before it exits. The file is not being unlocked when it exits. I have tried running the same process on three different all running the same version of OpenVMS and it works fine. Has anyone got any ideas?

Try searching for the process that has the file open on that drive by setting your default to the root of that drive and then with sho device/files. That should show you the process that has that particular file open, and you should be able to gain more information as to why the process will not unlock the file.

If you're willing to recompile then use the synchronous version of the deq (sys$deqw) instead. You're likely exiting before the request completes which can terminate the request (image run down). You really do want to wait for the lock to release to exit. When the process exits the lock will also clear (unless there is a bug in 5.4-2 allowing the lock to outlive the process).
A lot has to do with the language you're using to queue these locks. I assume it's Macro since you're using the system service calls for file access. If you are doing I/O on the file try letting QIO do the locking for you and then image run down will take care of the lock if you don't get a chance to release it yourself (i.e. the process blows up). If there's no file envolved (using a lock as a semaphore) then I'm way too rusty to help....
Good luck...

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |