293 |
(* Options.load downloads_expert_ini; *) |
(* Options.load downloads_expert_ini; *) |
294 |
with e -> |
with e -> |
295 |
lprintf_nl "Exception %s during options load" (Printexc2.to_string e); |
lprintf_nl "Exception %s during options load" (Printexc2.to_string e); |
296 |
exit 2; |
exit 70; |
297 |
()); |
()); |
298 |
|
|
299 |
(* Here, we try to update options when a new version of mldonkey is |
(* Here, we try to update options when a new version of mldonkey is |
372 |
"-daemon", Arg.Unit (fun _ -> |
"-daemon", Arg.Unit (fun _ -> |
373 |
(* Removed due to savannah bug #11514 . *) |
(* Removed due to savannah bug #11514 . *) |
374 |
lprintf_nl "\n\nOption -daemon was removed.\nUse 'mlnet > /dev/null 2>&1 &' instead. Exiting..."; |
lprintf_nl "\n\nOption -daemon was removed.\nUse 'mlnet > /dev/null 2>&1 &' instead. Exiting..."; |
375 |
exit 0), _s " : this argument was removed, core will exit"; |
exit 64), _s " : this argument was removed, core will exit"; |
376 |
"-find_port", Arg.Set find_other_port, |
"-find_port", Arg.Set find_other_port, |
377 |
_s " : find another port when one is already used"; |
_s " : find another port when one is already used"; |
378 |
] @ |
] @ |
428 |
begin |
begin |
429 |
lprintf_nl (_b "\n\n\nYour system has a system date earlier than 2004, please correct it."); |
lprintf_nl (_b "\n\n\nYour system has a system date earlier than 2004, please correct it."); |
430 |
lprintf_nl (_b "MLdonkey can not work with such a system date, exiting..."); |
lprintf_nl (_b "MLdonkey can not work with such a system date, exiting..."); |
431 |
CommonGlobals.exit_properly 0 |
CommonGlobals.exit_properly 71 |
432 |
end; |
end; |
433 |
|
|
434 |
( |
( |
570 |
with e -> |
with e -> |
571 |
lprintf_nl (_b "Exception %s trying to set user_uid [%s]") |
lprintf_nl (_b "Exception %s trying to set user_uid [%s]") |
572 |
(Printexc2.to_string e) !!run_as_user; |
(Printexc2.to_string e) !!run_as_user; |
573 |
exit 2 |
exit 67 |
574 |
end; |
end; |
575 |
|
|
576 |
if !!run_as_useruid <> 0 then begin |
if !!run_as_useruid <> 0 then begin |
580 |
with e -> |
with e -> |
581 |
lprintf_nl (_b "Exception %s trying to set user_uid [%d]") |
lprintf_nl (_b "Exception %s trying to set user_uid [%d]") |
582 |
(Printexc2.to_string e) !!run_as_useruid; |
(Printexc2.to_string e) !!run_as_useruid; |
583 |
exit 2 |
exit 67 |
584 |
end; |
end; |
585 |
|
|
586 |
if !!create_mlsubmit then save_mlsubmit_reg (); |
if !!create_mlsubmit then save_mlsubmit_reg (); |
643 |
lprintf_nl (_b "Cannot create Security space file:"); |
lprintf_nl (_b "Cannot create Security space file:"); |
644 |
lprintf_nl (_b " not enough space on device or bad permissions"); |
lprintf_nl (_b " not enough space on device or bad permissions"); |
645 |
lprintf_nl (_b "Exiting..."); |
lprintf_nl (_b "Exiting..."); |
646 |
exit 2; |
exit 73; |
647 |
end; |
end; |
648 |
CommonGlobals.do_at_exit (fun _ -> |
CommonGlobals.do_at_exit (fun _ -> |
649 |
(* If we have an error with too many file-descriptors, |
(* If we have an error with too many file-descriptors, |