#include <timely/time_control.h>
#include <stdlib.h>
-#ifndef _MSC_VER
+//#ifndef _MSC_VER
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#else
+/*
+ * #else
#include <process.h>
#include <shellapi.h>
#include <shlobj.h>
#endif
+*/
//#define DEBUG_LAUNCH_PROCESS
// uncomment for noisier debugging info.
return __hidden_kids;
}
+/*
#ifdef _MSC_VER
bool launch_process::event_poll(MSG &message)
{
message.message = 0;
message.wParam = 0;
message.lParam = 0;
- if (!PeekMessage(&message, NIL, 0, 0, PM_REMOVE))
+ if (!PeekMessage(&message, NULL_POINTER, 0, 0, PM_REMOVE))
return false;
TranslateMessage(&message);
DispatchMessage(&message);
return true;
}
#endif
+*/
#define SUPPORT_SHELL_EXECUTE
// if this is not commented out, then the ShellExecute version of launch_
//const int MAXIMUM_COMMAND_LINE = 32 * KILOBYTE;
// maximum command line that we'll deal with here.
-#ifndef _MSC_VER
+//#ifndef _MSC_VER
void launch_process::exiting_child_signal_handler(int sig_num)
{
FUNCDEF("exiting_child_signal_handler");
}
}
}
-#endif
+//#endif
//hmmm: this doesn't seem to account for quoting properly at all?
char_star_array launch_process::break_line(astring &app, const astring ¶meters)
.stuff(to_return[to_return.last()], len);
}
// add the sentinel to the list of strings.
- to_return += NIL;
+ to_return += NULL_POINTER;
#ifdef DEBUG_LAUNCH_PROCESS
for (int q = 0; to_return[q]; q++) {
LOG(a_sprintf("%d: %s\n", q, to_return[q]));
app_name.insert(0, "\"");
if (app_name[app_name.end()] != '"')
app_name += "\"";
-#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
+//#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
// unix / linux implementation.
if (flag & RETURN_IMMEDIATELY) {
// they want to get back right away.
// assume they want to wait.
return system((app_name + " " + command_line).s());
}
+/*
#elif defined(_MSC_VER)
//checking on whether we have admin rights for the launch.
// }
}
astring parms = app_name + " " + command_line;
- bool success = CreateProcess(NIL, to_unicode_temp(parms), NIL, NIL, false,
- create_flag, NIL, NIL, &startup_info, &process_info);
+ bool success = CreateProcess(NULL_POINTER, to_unicode_temp(parms), NULL_POINTER, NULL_POINTER, false,
+ create_flag, NULL_POINTER, NULL_POINTER, &startup_info, &process_info);
if (!success)
return critical_events::system_error();
// success then, merge back into stream.
#else
#pragma error("hmmm: launch_process: no implementation for this OS.")
#endif
+*/
return 0;
}