Welcome to the CHICKEN Scheme pasting service

a stab in the dark added by megane on Wed Jul 11 17:54:23 2012

diff --git a/posixwin.scm b/posixwin.scm
index 88a4a4f..f195e29 100644
--- a/posixwin.scm
+++ b/posixwin.scm
@@ -787,10 +787,14 @@ C_process(const char * app, const char * cmdlin, const char ** env,
     {
 	if (f_share_io[i])
 	{
+	  if (standard_io_handles[i] == INVALID_HANDLE_VALUE) {
+	    success = NULL;
+	  } else {
 	    success = DuplicateHandle(
 		cur_process, standard_io_handles[i],
 		cur_process, &child_io_handles[i],
-		0, FALSE, DUPLICATE_SAME_ACCESS);
+		0, TRUE, DUPLICATE_SAME_ACCESS);
+	  }
 	}
 	else
 	{

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What does `(string? "foo")' produce?
Visually impaired? Let me spell it for you (wav file) download WAV