Re: Safe unlocking

From: Vladimir Zolotykh (gsmith_at_eurocom.od.ua)
Date: 11/28/03


Date: Fri, 28 Nov 2003 15:22:32 +0200


> one simplistic way to handle normal sorts of unexpected death is to fork
> after creating the lock file, then let the parent remove it when the child
> (which does all the work) exits.

Obliged to you. I like the idea.

-- 
Vladimir Zolotykh


Relevant Pages

  • trying to understand fork and wait
    ... I would really appreciate some feedback on a Perl program I'm trying ... My plan is to have a single Perl script running while the ... I still do not understand how to use fork and wait ... } #end parent while loop ...
    (comp.lang.perl.misc)
  • Re: timing a fork
    ... if ($kid) { ... That is why I want the child process to be detached. ... But, I'm new to modperl, and I think a fork doesn't copy the ... What it does is say that the parent isn't interested in ...
    (perl.beginners)
  • Re: timing a fork
    ... if ($kid) { ... What it does is say that the parent isn't interested in ... Once a parent process has forked it can carry on on its own while the child ... In fact what a call to 'system' does is to fork a child ...
    (perl.beginners)
  • Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another
    ... So the fix used in ksm page_wrprotect and in fork() is to check ... that's enough for forkto generate data corruption in the ... parent. ... The moment the parent pte is marked readonly, ...
    (Linux-Kernel)
  • Re: Slave not removing slave_proc_* files
    ... Mongrel doesn't fork so this won't work. ... So my guess that I am using Slave wrong appears correct. ... the parent which kills the children, etc. to get the job done. ... cid = fork ...
    (comp.lang.ruby)