summaryrefslogtreecommitdiff
path: root/retrace/daemon/glframe_os_win.cpp
diff options
context:
space:
mode:
authorMark Janes <mark.a.janes@intel.com>2015-06-08 16:25:12 -0700
committerMark Janes <mark.a.janes@intel.com>2017-06-19 14:04:44 -0700
commit62b409d330d1b2c60b1f1a48bb78d7a386880af9 (patch)
treede7dcc399d7cbe0065c201b6dc1dc19c9eca405a /retrace/daemon/glframe_os_win.cpp
parent159a48e20c9928c94b70c8de50e9636eeecfac55 (diff)
wip: windows cross platform
Made partial progress toward abstracting fork(), which doesn't exist on windows.
Diffstat (limited to 'retrace/daemon/glframe_os_win.cpp')
-rw-r--r--retrace/daemon/glframe_os_win.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/retrace/daemon/glframe_os_win.cpp b/retrace/daemon/glframe_os_win.cpp
new file mode 100644
index 00000000..48eb2217
--- /dev/null
+++ b/retrace/daemon/glframe_os_win.cpp
@@ -0,0 +1,51 @@
+// Copyright (C) Intel Corp. 2015. All Rights Reserved.
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+
+// The above copyright notice and this permission notice (including the
+// next paragraph) shall be included in all copies or substantial
+// portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// **********************************************************************/
+// * Authors:
+// * Mark Janes <mark.a.janes@intel.com>
+// **********************************************************************/
+
+namespace glretrace {
+
+int execv(const char *path, char *const argv[])
+{
+ std::stringstream cmdLine;
+ cmdLine << path;
+ char *i = argv[0];
+ while (i != NULL) {
+ cmdLine << i;
+ }
+ return CreateProcess(
+ path,
+ cmdLine.str().c_str(),
+ NULL,
+ NULL,
+ false,
+ 0,
+ NULL, //_In_opt_ LPVOID lpEnvironment,
+ NULL, //_In_opt_ LPCTSTR lpCurrentDirectory,
+ NULL, //_In_ LPSTARTUPINFO lpStartupInfo,
+ NULL //_Out_ LPPROCESS_INFORMATION lpProcessInformation
+ );
+}
+}