summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-09 18:49:12 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-09 18:49:12 +0000
commitf83751a730227a9002a455128633ba7f41582d91 (patch)
treeb7454285ddcda77ad03f31cf7e583378673f635d /win32
parentd3f7f2b292e54c14f8b24c9e784edc6ace9d7abf (diff)
downloadperl-f83751a730227a9002a455128633ba7f41582d91.tar.gz
track more of the child state on Windows
p4raw-id: //depot/perl@5631
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c16
-rw-r--r--win32/win32.h17
2 files changed, 30 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 97b51bab10..840274beab 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3203,10 +3203,20 @@ win32_spawnvp(int mode, const char *cmdname, const char *const *argv)
}
memset(&StartupInfo,0,sizeof(StartupInfo));
StartupInfo.cb = sizeof(StartupInfo);
+ memset(&tbl,0,sizeof(tbl));
PerlEnv_get_child_IO(&tbl);
- StartupInfo.hStdInput = tbl.childStdIn;
- StartupInfo.hStdOutput = tbl.childStdOut;
- StartupInfo.hStdError = tbl.childStdErr;
+ StartupInfo.dwFlags = tbl.dwFlags;
+ StartupInfo.dwX = tbl.dwX;
+ StartupInfo.dwY = tbl.dwY;
+ StartupInfo.dwXSize = tbl.dwXSize;
+ StartupInfo.dwYSize = tbl.dwYSize;
+ StartupInfo.dwXCountChars = tbl.dwXCountChars;
+ StartupInfo.dwYCountChars = tbl.dwYCountChars;
+ StartupInfo.dwFillAttribute = tbl.dwFillAttribute;
+ StartupInfo.wShowWindow = tbl.wShowWindow;
+ StartupInfo.hStdInput = tbl.childStdIn;
+ StartupInfo.hStdOutput = tbl.childStdOut;
+ StartupInfo.hStdError = tbl.childStdErr;
if (StartupInfo.hStdInput != INVALID_HANDLE_VALUE &&
StartupInfo.hStdOutput != INVALID_HANDLE_VALUE &&
StartupInfo.hStdError != INVALID_HANDLE_VALUE)
diff --git a/win32/win32.h b/win32/win32.h
index 1669ea4b29..81bf5747a9 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -302,6 +302,23 @@ typedef struct {
HANDLE childStdIn;
HANDLE childStdOut;
HANDLE childStdErr;
+ /*
+ * the following correspond to the fields of the same name
+ * in the STARTUPINFO structure. Embedders can use these to
+ * control the spawning process' look.
+ * Example - to hide the window of the spawned process:
+ * dwFlags = STARTF_USESHOWWINDOW;
+ * wShowWindow = SW_HIDE;
+ */
+ DWORD dwFlags;
+ DWORD dwX;
+ DWORD dwY;
+ DWORD dwXSize;
+ DWORD dwYSize;
+ DWORD dwXCountChars;
+ DWORD dwYCountChars;
+ DWORD dwFillAttribute;
+ WORD wShowWindow;
} child_IO_table;
DllExport void win32_get_child_IO(child_IO_table* ptr);