{"id":8037,"date":"2004-10-11T16:00:00","date_gmt":"2004-10-11T14:00:00","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/2004\/10\/11\/secure-programmer-prevent-race-conditions\/"},"modified":"2005-04-17T07:37:45","modified_gmt":"2005-04-17T04:37:45","slug":"secure-programmer-prevent-race-conditions","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2004\/10\/11\/secure-programmer-prevent-race-conditions\/","title":{"rendered":"Secure programmer: Prevent race conditions"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><img decoding=\"async\" class=\"alignright\" src=\"\/wordpress\/wp-content\/20041010-ibm_logo.gif\" alt=\"\"\/><a href=\"http:\/\/www-130.ibm.com\/developerworks\/\">IBM developerWorks<\/a> runs an excellent article about preventing race conditions &#8211; &#8220;<a href=\"http:\/\/www-128.ibm.com\/developerworks\/library-combined\/l-sprace.html\">Secure programmer: Prevent race conditions<\/a>&#8220;.  It is written in clean and simple language and explains nicely most common problems with races.  It talks about lock files, alternatives to lock files, and doing lock files properly.  It features good examples and solutions are described for several languages, including Perl.<\/p>\n<p>This is surely a must read for anyone writing software in general and for multiuser or mutlitasking systems in particular.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>IBM developerWorks runs an excellent article about preventing race conditions &#8211; &#8220;Secure programmer: Prevent race conditions&#8220;. It is written in clean and simple language and explains nicely most common problems with races. It talks about lock files, alternatives to lock files, and doing lock files properly. It features good examples and solutions are described for &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2004\/10\/11\/secure-programmer-prevent-race-conditions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Secure programmer: Prevent race conditions<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62],"tags":[],"keyring_services":[],"class_list":["post-8037","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":24721,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/09\/11\/latency-numbers-every-programmer-should-know\/","url_meta":{"origin":8037,"position":0},"title":"Latency Numbers Every Programmer Should Know","author":"Leonid Mamchenkov","date":"September 11, 2015","format":false,"excerpt":"I'm saving this here for current and future generations of programmers: This is a copy-paste of this gist, referenced from this blog post. Read and share both, for the better world.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"latency","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/09\/latency-500x250.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7368,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/fix-rpm-process-hanging-on-a-red-hat-linux-installation\/","url_meta":{"origin":8037,"position":1},"title":"Fix RPM process hanging on a Red Hat Linux installation","author":"Leonid Mamchenkov","date":"March 23, 2004","format":false,"excerpt":"Unfortunately, it happens rather often recently that Red Hat Package Manager (rpm) just hangs during some operation. After it does so, rpm stops working completely and even reboot (hehe) doesn't help. Well, the problem is well known and is in Red Hat's bugzilla. For now, here is a quick fix\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11298,"url":"https:\/\/mamchenkov.net\/wordpress\/2008\/06\/07\/programming-language-barrier\/","url_meta":{"origin":8037,"position":2},"title":"Programming language barrier","author":"Leonid Mamchenkov","date":"June 7, 2008","format":false,"excerpt":"One of the frequent things that I hear about programmers is that it doesn't matter which language the person is using and which language you need him to use, because if he is any good he'll learn and catch up pretty fast.\u00a0 In other words, if you take a decent\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27162,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/12\/22\/signs-that-youre-a-bad-programmer\/","url_meta":{"origin":8037,"position":3},"title":"Signs that you&#8217;re a bad programmer","author":"Leonid Mamchenkov","date":"December 22, 2016","format":false,"excerpt":"Software Engineering Tips shares some tips on how to figure out if you are a bad programmer, and how to remedy that. Signs that you're a bad programmer Inability to reason about code Poor understanding of the language's programming model Deficient research skills \/ Chronically poor knowledge of the platform's\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27980,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/09\/09\/every-programmer-should-know\/","url_meta":{"origin":8037,"position":4},"title":"Every Programmer Should Know","author":"Leonid Mamchenkov","date":"September 9, 2017","format":false,"excerpt":"\"Every Programmer Should Know\" is a collection of subjects and resources that every programmer should know. \u00a0It is not specific to any technology stack, and it's rich enough to offer something to programmer of any level or experience. While the whole list is great, I'll single out this Big O\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/09\/big-o-500x353.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":27362,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/02\/19\/programmer-interrupted\/","url_meta":{"origin":8037,"position":5},"title":"Programmer Interrupted","author":"Leonid Mamchenkov","date":"February 19, 2017","format":false,"excerpt":"Slashdot runs a thread on \"Are Remote Software Teams More Productive?\". \u00a0The original post links to a few research references that, unsurprisingly, show how expensive interruptions are to programmers, and how unprepared we are, as an industry, to deal with this problem. \u00a0I particularly liked a rather in-depth look at\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/8037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=8037"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/8037\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=8037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=8037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=8037"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=8037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}