LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 01:50 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 128,264

Rep: Reputation: 118Reputation: 118
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-18-2013 11:50 PM
LXer: Bash Shell Variables an Introduction LXer Syndicated Linux News 0 11-10-2010 06:00 PM
LXer: Using flock to protect critical sections in shell scripts LXer Syndicated Linux News 0 01-12-2009 02:10 AM
LXer: Women flock to Linux talkfest LXer Syndicated Linux News 1 12-21-2006 11:16 AM
LXer: Flock beta rocks LXer Syndicated Linux News 0 06-17-2006 01:33 PM

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

All times are GMT -5. The time now is 10:46 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
Open Source Consulting | Domain Registration