]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-45104: ignore renice errors
authorMarcus Granado <marcus.granado@eu.citrix.com>
Tue, 12 Oct 2010 11:13:54 +0000 (12:13 +0100)
committerMarcus Granado <marcus.granado@eu.citrix.com>
Tue, 12 Oct 2010 11:13:54 +0000 (12:13 +0100)
This patch works around a race-condition bug in forkhelpers where
the pid might not be valid anymore before forkhelpers.waitpid is
called, in case the related process is very short-lived.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
stdext/gzip.ml

index 625d367b705806adcf09a7be62813d702976fd56..1c017317e4e257e10bf408a40f6e8620d45cf961 100644 (file)
@@ -73,7 +73,7 @@ let go (mode: zcat_mode) (input: input_type) fd f =
         close close_now;
    finally
      (fun () -> 
-       lower_priority pid;  (* lowest priority to gzip *)
+       (try lower_priority pid with _->()); (* lowest priority to gzip *)
        f close_later
      )
           (fun () ->