LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-17-2008, 06:43 AM   #1
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Rep: Reputation: 15
How to restrict simultaneous multiple access to a common file


Hello,
I need to run 10 fuctions in the background simultaneously. Each function will need to write its output several times to a common output file. How can i restrict the access so that only one functions may access and write to the file at a time (i.e. all the functions do not write to the common output file simultaneously). Also i need to run another function when all the previous 10 functions completes their jobs. How do i know whether the previous functions have completed their jobs? Please help. Thanks.
 
Old 06-17-2008, 07:25 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,989
Blog Entries: 5

Rep: Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780
Have a look at "flock" (File lock). There are man pages for it on Linux.
 
Old 06-17-2008, 12:13 PM   #3
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Original Poster
Rep: Reputation: 15
confused with flock... is there any easy solution?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Restrict ALL access to file from web blizunt7 Linux - Security 2 08-15-2007 02:08 PM
Multiple, simultaneous network interfaces indienick Linux - Networking 4 07-31-2006 10:33 AM
Postfix file locking stops simultaneous user access david.skinner Linux - Software 0 12-21-2005 01:40 PM
multiple simultaneous logins phonecian Linux - Newbie 6 06-05-2005 09:40 AM
restrict file access loocw General 0 03-07-2001 12:37 AM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration