# HG changeset patch # User Sebastien Jodogne # Date 1567071686 -7200 # Node ID 70524b4acc726adc6a63ecb5540b0586ed429165 # Parent 69e49fc044f8543a09df0cf7897aa74d36fec7ec Name of temporary files now include the process ID to ease design of scripts cleaning /tmp diff -r 69e49fc044f8 -r 70524b4acc72 Core/TemporaryFile.cpp --- a/Core/TemporaryFile.cpp Wed Aug 28 16:54:00 2019 +0200 +++ b/Core/TemporaryFile.cpp Thu Aug 29 11:41:26 2019 +0200 @@ -63,7 +63,13 @@ } // We use UUID to create unique path to temporary files - std::string filename = "Orthanc-" + Orthanc::Toolbox::GenerateUuid(); + const std::string uuid = Orthanc::Toolbox::GenerateUuid(); + + // New in Orthanc 1.5.8: Prefix the process ID to the name of the + // temporary files, in order to locate orphan temporary files that + // were left by instances of Orthanc that exited in non-clean way + // https://groups.google.com/d/msg/orthanc-users/MSJX53bw6Lw/d3S3lRRLAwAJ + std::string filename = "Orthanc-" + boost::lexical_cast(SystemToolbox::GetProcessId()) + "-" + uuid; if (extension != NULL) { diff -r 69e49fc044f8 -r 70524b4acc72 NEWS --- a/NEWS Wed Aug 28 16:54:00 2019 +0200 +++ b/NEWS Thu Aug 29 11:41:26 2019 +0200 @@ -6,6 +6,7 @@ * Security: If remote access is enabled, HTTP authentication is also enabled by default * Log an explicit error if uploading an empty DICOM file using REST API +* Name of temporary files now include the process ID to ease design of scripts cleaning /tmp * Fix compatibility of LSB binaries with Ubuntu >= 18.04 * Fix generation of "SOP Instance UID" on split and merge