Solved

file locking in GNU pascal for Linux

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now