data fork problem

Hi All,
I have an  application that locks a file by puting some informations at the beginning of its data fork.
so it can,t be open by another application.
My question is :
I s there any way to prevent  the application from doing so?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bachra04Author Commented:
This does not resolve the problem because my purpose is to eliminate the locking mechanism implemented by this application (of course I dispose only with the executable of this application).
So is it it possible to protect only one part (let's say the first 256 bits) of data fork from writing.
and make them read only.
Both lockf() and fcntl() provide for locking regions of files - specified as a range of bytes 256 bits == 64 bytes.

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

bachra04Author Commented:
Thank you for your comments ,
As you've said lockf and fcntl provide locking region but this didn't help me prevent the locking action of the application.
What I think is that application uses flock () to provide exclusif access.
My last action :
Is there a way to prevent or to fail the action of flock() programmatically ?
At the documentation I see that flock may be failed  by signals
"Processes blocked awaiting a lock may be awakened by signals."
So is it possible to do that by programming.

In conclusion:
The first application open a data file and locks it for its exclusif use.
I want my application to open the same file at this moment and remove the locking so I can write on it Is this possible?

Thank you again


I you lock the file yourself (before the other application does so), using the same locking mechanism,
you will prevent the other app from locking the file.  However that will probably adversely affect
the application in question ( it will probably either wait for the lock to be released, or generate
and error, or simply exit).   Your posts indicate that your goal is to "fool" the application into thinking
it locked the file without actually doing so.  Keep in mind that the application likely uses file locking to
coordinate activity and/or prevent data corruption.

You have apparently asked us how to do something that seems unwise.  Perhaps we need to understand
what the greater goal is.   Why do you wish to disable application file locking?  What are you trying
to accomplish?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bachra04Author Commented:
#Your posts indicate that your goal is to "fool" the application into thinking
#it locked the file without actually doing so.  

yes this is exactely what I want to do.

#Keep in mind that the application likely uses file locking to
#coordinate activity and/or prevent data corruption.

I agree with you but I planned to take care of that from my application.

My Goal is to convert a standalone application to pseudo centralized application.
But it seems impossible
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.