mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
glib/gspawn-win32.c Implement G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce
2004-03-10 Tor Lillqvist <tml@iki.fi> * glib/gspawn-win32.c * glib/gspawn-win32-helper.c: Implement G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce Hochstetler) * tests/spawn-test.c * tests/spawn-test-win32-gui.c: Test it.
This commit is contained in:
committed by
Tor Lillqvist
parent
55df929d48
commit
f4cb22c78d
@@ -10,7 +10,14 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
char *lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
if (__argc <= 2)
|
||||
char buf[100];
|
||||
|
||||
if (__argc >= 2 && strcmp (__argv[1], "nop") == 0)
|
||||
{
|
||||
sprintf (buf, "spawn-test-win32-gui: argv[0]=\"%s\"", __argv[0]);
|
||||
MessageBox (NULL, buf, lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
|
||||
}
|
||||
else if (__argc <= 2)
|
||||
{
|
||||
MessageBox (NULL, "spawn-test-win32-gui: Will write to stdout",
|
||||
lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
|
||||
@@ -29,7 +36,6 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
int infd = atoi (__argv[2]);
|
||||
int outfd = atoi (__argv[3]);
|
||||
int k, n;
|
||||
char buf[100];
|
||||
|
||||
if (infd < 0 || outfd < 0)
|
||||
{
|
||||
@@ -87,9 +93,6 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox (NULL, "spawn-test-win32-gui: Sleeping a bit.",
|
||||
lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
|
||||
|
||||
Sleep (2000);
|
||||
|
||||
MessageBox (NULL, "spawn-test-win32-gui: Done, exiting.",
|
||||
|
Reference in New Issue
Block a user