LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 06-04-2013, 02:50 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 96,873

Rep: Reputation: 96
LXer: Linux shell: Introduction to Flock


Published at LXer:

Recently a colleague of mine should run multiple parallel jobs on a server (around 20 in our specific case), every job does “an elaboration” and this can take a time longer or shorter in respect of the others, once a job finishes its task it must read from a text file the first line that indicate the ID of a new job, it removes that ID from the top of the text file and starts to elaborate it. Problem: On a long run (a run of 50K+ jobs) it happens “frequently” that 2 jobs finish at the same time and so both take the same ID causing problems to the whole process. The solution was to use the bash function flock.

Read More...
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Mastering The Linux Shell - Introduction LXer Syndicated Linux News 0 03-19-2013 12:50 AM
LXer: Bash Shell Variables an Introduction LXer Syndicated Linux News 0 11-10-2010 07:00 PM
LXer: Using flock to protect critical sections in shell scripts LXer Syndicated Linux News 0 01-12-2009 03:10 AM
LXer: Women flock to Linux talkfest LXer Syndicated Linux News 1 12-21-2006 12:16 PM
LXer: Flock beta rocks LXer Syndicated Linux News 0 06-17-2006 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration