~stolowski/unity-scopes-api/fix-1393382-rtm

« back to all changes in this revision

Viewing changes to src/scopes/internal/Utils.cpp

  • Committer: Pawel Stolowski
  • Date: 2014-11-04 14:33:07 UTC
  • mfrom: (241.1.20 unity-scopes-api)
  • Revision ID: pawel.stolowski@canonical.com-20141104143307-cs70gjyowjtwpk69
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <unity/UnityExceptions.h>
22
22
#include <iomanip>
23
23
#include <locale>
 
24
#include <mutex>
24
25
 
25
26
namespace unity
26
27
{
142
143
    return false;
143
144
}
144
145
 
 
146
int safe_system_call(std::string const& command)
 
147
{
 
148
    static std::mutex system_mutex;
 
149
    std::lock_guard<std::mutex> lock(system_mutex);
 
150
    return std::system(command.c_str());
 
151
}
 
152
 
145
153
} // namespace internal
146
154
 
147
155
} // namespace scopes