~ubuntu-branches/ubuntu/utopic/mongodb/utopic

« back to all changes in this revision

Viewing changes to src/mongo/util/processinfo.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-07-03 09:23:46 UTC
  • mfrom: (1.3.10) (44.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140703092346-c5bvt46wnzougyly
Tags: 1:2.6.3-0ubuntu1
* New upstream stable release:
  - Dropped patches, included upstream:
    + 0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
    + 0008-Use-system-libstemmer.patch
    + 0011-Use-a-signed-char-to-store-BSONType-enumerations.patch
    + 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch
    + 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch
  - d/p/*: Refreshed/rebased remaining patches.
  - Use system provided libyaml-cpp:
    + d/control: Add libyaml-cpp-dev to BD's.
    + d/rules: Enable --with-system-yaml option.
    + d/p/fix-yaml-detection.patch: Fix detection of libyaml-cpp library.
  - d/mongodb-server.mongodb.upstart: Sync changes from upstream.
  - d/control,mongodb-dev.*: Drop mongodb-dev package; it has no reverse
    dependencies and upstream no longer install header files.
  - d/NEWS: Point users to upstream upgrade documentation for upgrades
    from 2.4 to 2.6.
* Merge from Debian unstable.
* d/control: BD on libv8-3.14-dev to ensure that transitioning to new v8
  versions is a explicit action due to changes in behaviour in >= 3.25
  (LP: #1295723).
* d/mongodb-server.prerm: Dropped debug echo call from maintainer script
  (LP: #1294455).

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#pragma once
19
19
 
20
 
#include <sys/types.h>
21
20
#include <string>
22
21
 
23
 
#ifndef _WIN32
24
 
#include <unistd.h>
25
 
#else
26
 
typedef int pid_t;
27
 
int getpid();
28
 
#endif
29
 
 
30
 
#include <db/jsobj.h>
 
22
#include "mongo/platform/cstdint.h"
 
23
#include "mongo/platform/process_id.h"
 
24
#include "mongo/db/jsobj.h"
31
25
 
32
26
namespace mongo {
33
27
 
34
28
    class ProcessInfo {
35
29
    public:
36
 
        ProcessInfo( pid_t pid = getpid() );
 
30
        ProcessInfo( ProcessId pid = ProcessId::getCurrent() );
37
31
        ~ProcessInfo();
38
32
 
39
33
        /**
171
165
            void collectSystemInfo();
172
166
        };
173
167
 
174
 
        pid_t _pid;
 
168
        ProcessId _pid;
175
169
        static mongo::mutex _sysInfoLock;
176
170
 
177
171
        static bool checkNumaEnabled();
187
181
 
188
182
    };
189
183
 
190
 
    void writePidFile( const std::string& path );
 
184
    bool writePidFile( const std::string& path );
191
185
 
192
186
    void printMemInfo( const char * whereContextStr = 0 );
193
187