Solved

file locking in GNU pascal for Linux

Posted on 2001-08-10
4
201 Views
Last Modified: 2010-05-18
I have a pascal program that has to be launched by a PHP script on server in Linux environment. This program reads/writes a lot of files. How could I lock a read or written file to properly manage multiple users access ? In C language this is a 'flock' function, but I could not find a similar function in Pascal. I use GNU pascal compiler gpc for linux.
Thank you in advance for a response.
0
Comment
Question by:rainette
  • 2
4 Comments
 
LVL 5

Expert Comment

by:Jeff_2
ID: 6650878
FreePascal has an flock function in the 'linux' unit.

I have also found that it generates much smaller and faster applications than GPC.

The rest of your code should be be portable with a few minor 'tweaks'.

http://www.freepascal.org
0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 6789071
rainette:

Just a friendly reminder to return to your open questions.

thanks!
amp
community support moderator

2/8
0
 

Expert Comment

by:amp072397
ID: 6790762
rainette:

Why did you accept my answer? I am not an expert and I did not provide you with any information about your question.

amp
community support moderator
0
 

Author Comment

by:rainette
ID: 6793475
Because I didn't know what to do
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
After-hours service is a fact of life for most MSPs. While not the most pleasant aspect of the job, there are ways to make after-hours servicing a more profitable and organized enterprise.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question