diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-21 09:19:29 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-21 09:19:29 +0000 |
commit | eeaa4b59c4131fd841856f74c7d08d2c9c881235 (patch) | |
tree | e2e4acd9c87d398c3284355563dea7d637504e4d /examples/OS | |
parent | 729de6ff696ae865a82058d0e4a9e2f6983c103f (diff) | |
download | ATCD-eeaa4b59c4131fd841856f74c7d08d2c9c881235.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples/OS')
-rw-r--r-- | examples/OS/Process/Process.dsw | 12 | ||||
-rw-r--r-- | examples/OS/Process/imore.cpp | 25 | ||||
-rw-r--r-- | examples/OS/Process/imore.dsp | 101 |
3 files changed, 131 insertions, 7 deletions
diff --git a/examples/OS/Process/Process.dsw b/examples/OS/Process/Process.dsw index a2474e84a86..d61d1eb0e2d 100644 --- a/examples/OS/Process/Process.dsw +++ b/examples/OS/Process/Process.dsw @@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 5.00 ###############################################################################
+Project: "Imore"=.\imore.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "Process"=.\Process.dsp - Package Owner=<4>
Package=<5>
diff --git a/examples/OS/Process/imore.cpp b/examples/OS/Process/imore.cpp index bef6540569d..88a8e5dee87 100644 --- a/examples/OS/Process/imore.cpp +++ b/examples/OS/Process/imore.cpp @@ -18,7 +18,7 @@ // using pipes confuses MORE.COM on Win32 and it just acts like "cat" on Unix. // // = AUTHOR -// Nanbor Wang <nw1@cs.wustl.edu> +// Nanbor Wang <nanbor@cs.wustl.edu> // // ============================================================================ @@ -34,6 +34,8 @@ ACE_RCSID(Process, imore, "$Id$") #if defined (ACE_WIN32) static const char * executable = "MORE.COM"; +static char *rendezvous_dir = "c:/temp"; +static char *rendezvous_pfx = "imore"; #else static const char * executable = "more"; // I like less better. static char *rendezvous_dir = "/tmp"; @@ -220,7 +222,12 @@ main (int argc, char *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "Error, bailing out!\n"), -1); options.command_line (executable); - new_process.spawn (options); + if (new_process.spawn (options) == -1) + { + int error = ACE_OS::last_error (); + ACE_ERROR_RETURN ((LM_ERROR, "%p errno = %d.\n", + "test_more", error), -1); + } } // write file to ACE_STDOUT. @@ -231,14 +238,18 @@ main (int argc, char *argv[]) ACE_OS::close (ACE_STDOUT); #else // We can only pass a file handler directly to child process - // otherwise "more" doesn't act quite the way we want. What do you - // expect? It's just Billy boy's toy. Nonetheless, if your child - // processes don't need to interact with the terminal, we can use - // the exact code for Unixes on NT. + // otherwise "more" doesn't act quite the way we want. Nonetheless, + // if your child process don't need to interact with the terminal, + // we can use the exact code for Unixes on NT. ACE_Process_Options options; options.command_line (executable); options.set_handles (infile); - new_process.spawn (options); + if (new_process.spawn (options) == -1) + { + int error = ACE_OS::last_error (); + ACE_ERROR_RETURN ((LM_ERROR, "%p errno = %d.\n", + "test_more", error), -1); + } #endif /* ! ACE_WIN32 */ // Wait till we are done. diff --git a/examples/OS/Process/imore.dsp b/examples/OS/Process/imore.dsp new file mode 100644 index 00000000000..06f75186bb5 --- /dev/null +++ b/examples/OS/Process/imore.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="imore" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=imore - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "imore.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "imore.mak" CFG="imore - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Imore - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Imore - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Imore - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release"
+# PROP BASE Intermediate_Dir ".\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release"
+# PROP Intermediate_Dir ".\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "Imore - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\Debug"
+# PROP BASE Intermediate_Dir ".\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ".\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Imore - Win32 Release"
+# Name "Imore - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\imore.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
|