nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Questionable code - the bigger picture

2005-05-14 14:08:17
On Sat, 14 May 2005 13:13:44 PDT, Norman Shapiro said:

I accomplish a similar functionality with an sh function for use in scripts:

newmh () 
{ 
    local oldContext="${MHCONTEXT-context}";
    local path=`mhpath +`;
    export MHCONTEXT=,"$oldContext.$$";
    cp "$path/$oldContext" "$path/$MHCONTEXT"
}

Note that there are still race conditions in this.  True, they're small, but
still larger than "we never touch the context at all".

Attachment: pgpwdoHLejtd8.pgp
Description: PGP signature

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>