mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] [patch #4422] win32 goodies


From: su_blanc
Subject: [Mldonkey-users] [patch #4422] win32 goodies
Date: Tue, 20 Sep 2005 15:31:29 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

Follow-up Comment #13, patch #4422 (project mldonkey):

ok, i think i've got it...
Please comment the following points

1) There is 'bug' in basicSocket.ml in the function 'loop ()'.
where we use 'select !fd_tasks !timeout' we should replace it by 'if
!fd_tasks <> [] then select !fd_tasks !timeout' because win32 doesn't
appreciate at all an empty list (while exiting the app, we have plenty
'Exception select failed: Arg list too long in Select.loop' or 'Exception
select failed: Bad file descriptor in Select.loop').

2) in driverMain.ml in the call of CommonGlobals.do_at_exit (approx. line
#617 - for me) we do a 'try BasicSocket.close_all () with _ -> .....' but
some fd are marked not to be closed (Cf. the call of prevent_close in
basicSocket.ml). I think that we should close all fd on exit and create a new
function really_close_all in basicSocket.ml

----- // -----
let really_close_all () =
  List.iter (fun s ->
    close s Closed_by_user
  ) !fd_tasks
----- // -----

3) calling a print "core started" on Pervasives.stdout (core spawning), even
inside a 'try / with' block, seems to trigger a bug in Pervasives. Then
Pervasives.exit (called by CommonGlobal.exit_properly) doesn't work anymore
.... so we can't exit the basicSocket.loop function (endless looping ...)
The solution would be to print on stderr and not on stdout.
The physical result is the same if the printed messages are read on the
console.
I think this is how it was before. The messages printed by Printf2.lprintf
were routed to stderr that was the default out_channel (before the change to
the default out_channel mlnet.log).

----- // -----
  if not !keep_console_output then
    begin
      try
        Printf.fprintf Pervasives.stderr "%sCore started\n" (log_time ());
        Pervasives.flush Pervasives.stderr;
      with _ -> ()
    end;
----- // -----



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4422>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]