Solved

file locking in GNU pascal for Linux

Posted on 2001-08-10
4
198 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

775 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