- verboser log, faster start
[oweals/gnunet.git] / src / util / os_priority.c
index 983da42b17bb5f35015dc588895ee80286967bdc..e24d9fb7362930ba287e1b39b8de755e098aa632 100644 (file)
@@ -151,7 +151,12 @@ GNUNET_OS_install_parent_control_handler (void *cls,
     putenv (GNUNET_OS_CONTROL_PIPE "=");
     return;
   }
+#if !defined (WINDOWS)
   if (pipe_fd >= FD_SETSIZE)
+#else
+  if ((FILE_TYPE_UNKNOWN == GetFileType ((HANDLE) pipe_fd))
+      && (0 != GetLastError ()))
+#endif
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
          "GNUNET_OS_CONTROL_PIPE `%s' contains garbage?\n", env_buf);
@@ -1067,7 +1072,6 @@ start_process (int pipe_control,
       if (childpipe_write)
         GNUNET_DISK_file_close (childpipe_write);
       GNUNET_free (cmd);
-      GNUNET_free (path);
       return NULL;
     }
     /* Unlike *nix variant, we don't dup the handle, so can't close
@@ -1088,7 +1092,6 @@ start_process (int pipe_control,
     if (lsocks_pipe == NULL)
     {
       GNUNET_free (cmd);
-      GNUNET_free (path);
       GNUNET_DISK_pipe_close (lsocks_pipe);
       if (GNUNET_YES == pipe_control)
       {
@@ -1179,7 +1182,6 @@ start_process (int pipe_control,
 
   GNUNET_free (env_block);
   GNUNET_free (cmd);
-  GNUNET_free (path);
   free (wpath);
   free (wcmd);
   if (GNUNET_YES == pipe_control)