Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
24 user(s) are online (17 user(s) are browsing Forums)

Members: 0
Guests: 24

more...

Support us!

Headlines

 
  Register To Post  

Determine the program that locks a file
Home away from home
Home away from home


See User information
Is there a way to determine (with AmigaOS4 apps) what program holds a lock to certain files?

I have an image file which can't be deleted, but i can't tell which program is holding the lock.

Thank you

Go to top
Re: Determine the program that locks a file
Site Builder
Site Builder


See User information
Try to rename it and after a reboot see which app complains

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@walkero

That is not possible, since it's created on-the-fly and runs indefinitely.
Gets deleted and recreated on every WB start.

I know where the file comes from since i create it myself in a script, but i don't know which of the two programs accessing it bails out.

Go to top
Re: Determine the program that locks a file
Just popping in
Just popping in


See User information
@Raziel
It's more likely there is an Open() file which has not been closed.
If you have the OS4 SDK installed, there willl be an assignment of SDK:
in there is a C directory in which you will find a program called
"FileHandleScan", it takes one argument, the disk volume.

In a shell, try; FileHandleScan SYS:
for the boot volume, or replace SYS: with an actual volume name.

Or, no volume name to check every volume for all open files.

You can send the output to a log file; FileHandleScan >ram:openlist

If someone has left a filesystem lock on something, you're out of luck,
There was a 68K program called "Scout" that poked around with the
filesystems internal lock list, it may still work for this, but anything else will
likely crash badly, as the OS internals have changed a lot since then.

Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@Raziel

maybe use snoopy

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@colinw

Thank you will try

Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@LiveForIt

Snoopy is pretty limited when it comes to this kind of behaviour, also it display a vast amount of unneeded stuff and I'm too lazy to learn what to toggle and what to leave.

Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@Raziel

WRT snoopy you could capure a general log, a save it to ram:mysnoopylog and the do something like


cat ram:mysnoopylog | grep "myfilename"


Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@broadblues

I'm doing that already

Albeit not with cat/grep...my head refuses to wrap around the syntax...whenever i think i understand it, it won't work the next time :-/

Snoopy doesn't show anything, moreover would i need to catch the exact time when it locks and that happens very randomly.

I worked around it for now by simply downloading, saving and reusing the image files in question (less stress on the cpu - but more hdd space wasted - and most of the time one program less i have to start - the one that scales the image)

But thank you all for the pointers

Go to top
Re: Determine the program that locks a file
Just can't stay away
Just can't stay away


See User information
@Raziel

I'm a bit late, but SYSMON Misc->Locks

Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@jabirulo

Too late, back at work

But I'll check when I'm back home, thanks

Go to top
Re: Determine the program that locks a file
Home away from home
Home away from home


See User information
@jabirulo

Yes, that shows that one of the images is locked, but it doesn't show which program locks it (actually there are two locks on most of the files, so i'm not sure if one os the "system" and the other is the program)

Any way i can use that address to get to the program?

Address Access Path
61633C60 SHR Path:to/image.png
61633900 SHR Path:to/image.png

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project