summaryrefslogtreecommitdiff
path: root/ace/Process.i
diff options
context:
space:
mode:
authorharrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-05-08 05:08:05 +0000
committerharrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-05-08 05:08:05 +0000
commitadb27776d88b23a12e67039ed3afb9db84c1ffc2 (patch)
treee6830841a79ce326a298bb32e349c4242c65ce16 /ace/Process.i
parent8aab365a642239d8036b0a2d7b8addb561d6e7ee (diff)
downloadATCD-adb27776d88b23a12e67039ed3afb9db84c1ffc2.tar.gz
This contains the first pass at the new ACE_Process class. It is now
called ACE_ProcessEx. When it is completely ported to Solaris, we'll replace the current ACE_Process with ACE_ProcessEx.
Diffstat (limited to 'ace/Process.i')
-rw-r--r--ace/Process.i141
1 files changed, 141 insertions, 0 deletions
diff --git a/ace/Process.i b/ace/Process.i
index 3e7dafb44d6..31ec594f945 100644
--- a/ace/Process.i
+++ b/ace/Process.i
@@ -1,6 +1,32 @@
/* -*- C++ -*- */
// $Id$
+#if defined (ACE_WIN32)
+ACE_INLINE PROCESS_INFORMATION
+ACE_ProcessEx::process_info (void)
+{
+ return process_info_;
+}
+#endif /* ACE_WIN32 */
+
+
+ACE_INLINE pid_t
+ACE_ProcessEx::getpid (void)
+{
+#if defined (ACE_WIN32)
+ return process_info_.dwProcessId;
+#else /* ACE_WIN32 */
+ return child_id_;
+#endif /* ACE_WIN32 */
+}
+
+ACE_INLINE int
+ACE_ProcessEx::kill (int signum)
+{
+ return ACE_OS::kill (this->getpid (), signum);
+}
+
+// ************************************************************
ACE_INLINE pid_t
ACE_Process::getpid (void)
@@ -17,3 +43,118 @@ ACE_Process::kill (int signum)
{
return ACE_OS::kill (this->getpid (), signum);
}
+
+// ************************************************************
+
+#if defined (ACE_WIN32)
+
+ACE_INLINE BOOL
+ACE_Process_Options::new_console (void) const
+{
+ return new_console_;
+}
+
+ACE_INLINE void
+ACE_Process_Options::new_console (BOOL nc)
+{
+ new_console_ = nc;
+}
+
+ACE_INLINE STARTUPINFO *
+ACE_Process_Options::startup_info (void)
+{
+ return &startup_info_;
+}
+
+ACE_INLINE const LPSECURITY_ATTRIBUTES
+ACE_Process_Options::get_process_attributes (void) const
+{
+ return process_attributes_;
+}
+
+ACE_INLINE LPSECURITY_ATTRIBUTES
+ACE_Process_Options::set_process_attributes (void)
+{
+ process_attributes_ = &security_buf1_;
+ return process_attributes_;
+}
+
+ACE_INLINE const LPSECURITY_ATTRIBUTES
+ACE_Process_Options::get_thread_attributes (void) const
+{
+ return thread_attributes_;
+}
+
+ACE_INLINE LPSECURITY_ATTRIBUTES
+ACE_Process_Options::set_thread_attributes (void)
+{
+ thread_attributes_ = &security_buf2_;
+ return thread_attributes_;
+}
+
+#else /* !defined (ACE_WIN32) */
+
+ACE_INLINE ACE_HANDLE
+ACE_Process_Options::stdin (void)
+{
+ return stdin_;
+}
+
+ACE_INLINE ACE_HANDLE
+ACE_Process_Options::stdout (void)
+{
+ return stdout_;
+}
+
+ACE_INLINE ACE_HANDLE
+ACE_Process_Options::stderr (void)
+{
+ return stderr_;
+}
+
+#endif /* ACE_WIN32 */
+
+ACE_INLINE LPTSTR
+ACE_Process_Options::cl_options_buf (void)
+{
+ return cl_options_;
+}
+
+ACE_INLINE LPTSTR
+ACE_Process_Options::working_directory (void)
+{
+ if (working_directory_[0] == '\0')
+ return 0;
+ else
+ return working_directory_;
+}
+
+ACE_INLINE void
+ACE_Process_Options::working_directory (const TCHAR *wd)
+{
+ ACE_OS::strcpy (working_directory_, wd);
+}
+
+ACE_INLINE LPCTSTR
+ACE_Process_Options::path (void) const
+{
+ return path_;
+}
+
+ACE_INLINE void
+ACE_Process_Options::path (LPCTSTR p)
+{
+ ACE_OS::strcpy (path_, p);
+}
+
+ACE_INLINE BOOL
+ACE_Process_Options::handle_inheritence (void)
+{
+ return handle_inheritence_;
+}
+
+ACE_INLINE void
+ACE_Process_Options::handle_inheritence (BOOL hi)
+{
+ handle_inheritence_ = hi;
+}