From: <ped...@us...> - 2007-06-30 23:34:56
|
Revision: 1030 http://svn.sourceforge.net/cegcc/?rev=1030&view=rev Author: pedroalves Date: 2007-06-30 16:34:03 -0700 (Sat, 30 Jun 2007) Log Message: ----------- * rshd.c (stdin_thread): Revert previous commit - return 0 if the child is still running. (stdin_thread, stdout_thread, stderr_thread): Close reading and writing side of the pipes before returning. Modified Paths: -------------- trunk/cegcc/tools/rshd/ChangeLog trunk/cegcc/tools/rshd/rshd.c Modified: trunk/cegcc/tools/rshd/ChangeLog =================================================================== --- trunk/cegcc/tools/rshd/ChangeLog 2007-06-30 21:37:41 UTC (rev 1029) +++ trunk/cegcc/tools/rshd/ChangeLog 2007-06-30 23:34:03 UTC (rev 1030) @@ -1,3 +1,10 @@ +2007-07-01 Pedro Alves <ped...@po...> + + * rshd.c (stdin_thread): Revert previous commit - return 0 if the + child is still running. + (stdin_thread, stdout_thread, stderr_thread): Close reading and + writing side of the pipes before returning. + 2007-06-30 Pedro Alves <ped...@po...> * rshd.c (create_child): Add a few comments. Modified: trunk/cegcc/tools/rshd/rshd.c =================================================================== --- trunk/cegcc/tools/rshd/rshd.c 2007-06-30 21:37:41 UTC (rev 1029) +++ trunk/cegcc/tools/rshd/rshd.c 2007-06-30 23:34:03 UTC (rev 1030) @@ -296,8 +296,6 @@ else if (read == 0) { logprintf ("%s: connection closed\n", thread_name); - if (!data->stop) - ret = 1; break; } @@ -328,6 +326,8 @@ } out: + SafeCloseHandle (&data->readh[0]); + SafeCloseHandle (&data->writeh[0]); release_data (data); logprintf ("%s gone : %lu\n", thread_name, ret); return ret; @@ -393,6 +393,8 @@ } out: + SafeCloseHandle (&data->readh[1]); + SafeCloseHandle (&data->writeh[1]); release_data (data); logprintf ("%s gone : %lu\n", thread_name, ret); return ret; @@ -458,6 +460,8 @@ } out: + SafeCloseHandle (&data->readh[2]); + SafeCloseHandle (&data->writeh[2]); release_data (data); logprintf ("%s gone : %lu\n", thread_name, ret); return ret; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |