You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2017/12/15 23:59:28 UTC
[4/6] mesos git commit: Windows: Fixed type in job object `pid_list`
struct.
Windows: Fixed type in job object `pid_list` struct.
This type was erroneously declared as `ULONG_PTR` because the
documentation states it as such. This is true if the array is
dynamically allocated, then the struct ends with a pointer to the first
element of the array. However, we avoid this allocation by statically
defining the struct with an array the size of `max_pids` for process
identifiers. PIDs on Windows are `DWORD` typed, and since the array is
defined statically, the type is the element type, not the pointer type.
The compiler warning for this was missed in the noise of existent
compiler warnings on Windows.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9ac91568
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9ac91568
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9ac91568
Branch: refs/heads/master
Commit: 9ac915688a4083860bcec9f9fc26e258e28b94ff
Parents: c8ee3a0
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Tue Dec 12 09:38:00 2017 -0800
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Fri Dec 15 15:57:56 2017 -0800
----------------------------------------------------------------------
3rdparty/stout/include/stout/windows/os.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9ac91568/3rdparty/stout/include/stout/windows/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/os.hpp b/3rdparty/stout/include/stout/windows/os.hpp
index 586c35f..26a1a04 100644
--- a/3rdparty/stout/include/stout/windows/os.hpp
+++ b/3rdparty/stout/include/stout/windows/os.hpp
@@ -780,7 +780,7 @@ Result<std::set<Process>> _get_job_processes(const SharedHandle& job_handle) {
struct {
DWORD NumberOfAssignedProcesses;
DWORD NumberOfProcessIdsInList;
- ULONG_PTR ProcessIdList[max_pids];
+ DWORD ProcessIdList[max_pids];
} pid_list;
BOOL result = ::QueryInformationJobObject(