summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2007-02-15 13:12:27 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2007-02-15 13:12:27 +0000
commit6f299c69d455241d2a8a459edb4f104fb2351dc6 (patch)
tree61796ce47f81aba6c77d48df971dc64d1a08c1e5
parentc7a2ee0d76fb9844746753e859f9c39c29cd7dfe (diff)
downloadATCD-6f299c69d455241d2a8a459edb4f104fb2351dc6.tar.gz
ChangeLogTag: Thu Feb 15 13:12:01 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ACE/ChangeLog11
-rw-r--r--ACE/examples/OS/Process/imore.cpp29
2 files changed, 25 insertions, 15 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index e9aaccb54fd..5a678b3212d 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,14 @@
+Thu Feb 15 13:12:01 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
+
+ * examples/OS/Process/imore.cpp:
+
+ Removed an enclosing block around code that caused issue with
+ SunCC 5.8. There was a comment claiming that the block was needed
+ so that the ACE_Process_Options could elegantly close the file
+ handlers that it kept, however the ACE_Process_Options object does
+ not close the file handlers. The ACE_Process does the handle
+ closing.
+
Thu Feb 15 05:41:11 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com>
* ace/Service_Gestalt.inl:
diff --git a/ACE/examples/OS/Process/imore.cpp b/ACE/examples/OS/Process/imore.cpp
index 181254e0cb4..02b76ef48f5 100644
--- a/ACE/examples/OS/Process/imore.cpp
+++ b/ACE/examples/OS/Process/imore.cpp
@@ -215,24 +215,23 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_Process new_process;
- // Notice that we must enclose ACE_Process_Options in the block
- // so the file handlers it keeps can be close elegantly.
+ // The ACE_Process_Options does not need to be enclosed in a block
+ // because it does not close the file handles, the ACE_Process closes
+ // them upon destruction.
#if !defined (ACE_WIN32)
- {
- ACE_Process_Options options;
+ ACE_Process_Options options;
- if ((use_named_pipe ? ::setup_named_pipes :
- ::setup_unnamed_pipe) (options) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Error, bailing out!\n"), -1);
+ if ((use_named_pipe ? ::setup_named_pipes :
+ ::setup_unnamed_pipe) (options) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "Error, bailing out!\n"), -1);
- options.command_line (executable);
- 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);
- }
- }
+ options.command_line (executable);
+ 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.
if (::print_file (infile) == -1)