|
From: Jérémie D. <Ba...@us...> - 2010-01-28 18:38:54
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via b390b8ba32db284ca0862c893a8b6240235da7a9 (commit)
from bf3fd75b6941a6c1c29615bedf9774f1c2e62bda (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b390b8ba32db284ca0862c893a8b6240235da7a9
Author: Jérémie Dimino <je...@di...>
Date: Thu Jan 28 19:38:18 2010 +0100
daemonize immediatly, otherwise libusb crash
-----------------------------------------------------------------------
Changes:
diff --git a/PC_Mainboard/daemons/dbus-drivers/card_interface.ml b/PC_Mainboard/daemons/dbus-drivers/card_interface.ml
index e483eed..8bf514e 100644
--- a/PC_Mainboard/daemons/dbus-drivers/card_interface.ml
+++ b/PC_Mainboard/daemons/dbus-drivers/card_interface.ml
@@ -202,7 +202,9 @@ let motor_enable card =
RW.set_uint8 data 1 Protocol.motor_both;
Card.send_command card Protocol.cmd_motor data
-let () = Lwt_main.run begin
+lwt () =
+ if not !Common.foreground then Lwt_unix.daemonize ~keep_stderr:true ();
+
lwt card = Card.open_card ~vendor_id:Protocol.usb_vid ~product_id:Protocol.usb_pid_robot_interface
and bus = Lazy.force OBus_bus.system in
@@ -228,6 +230,4 @@ let () = Lwt_main.run begin
]
in
- if not !Common.foreground then Lwt_unix.daemonize ();
fst (Lwt.wait ())
-end
diff --git a/PC_Mainboard/daemons/dbus-drivers/card_motor.ml b/PC_Mainboard/daemons/dbus-drivers/card_motor.ml
index 14a4974..524db2c 100644
--- a/PC_Mainboard/daemons/dbus-drivers/card_motor.ml
+++ b/PC_Mainboard/daemons/dbus-drivers/card_motor.ml
@@ -75,7 +75,9 @@ let motor_enable card =
RW.set_uint8 data 1 Protocol.motor_both;
Card.send_command card Protocol.cmd_motor data
-let () = Lwt_main.run begin
+lwt () =
+ if not !Common.foreground then Lwt_unix.daemonize ~keep_stderr:true ();
+
lwt card = Card.open_card ~vendor_id:Protocol.usb_vid ~product_id:Protocol.usb_pid_motor_controller
and bus = Lazy.force OBus_bus.system in
@@ -92,6 +94,4 @@ let () = Lwt_main.run begin
]
in
- if not !Common.foreground then Lwt_unix.daemonize ();
fst (Lwt.wait ())
-end
diff --git a/PC_Mainboard/daemons/dbus-drivers/card_sensor.ml b/PC_Mainboard/daemons/dbus-drivers/card_sensor.ml
index f503c17..bca7626 100644
--- a/PC_Mainboard/daemons/dbus-drivers/card_sensor.ml
+++ b/PC_Mainboard/daemons/dbus-drivers/card_sensor.ml
@@ -117,7 +117,9 @@ end
| Entry point |
+-----------------------------------------------------------------+ *)
-let () = Lwt_main.run begin
+lwt () =
+ if not !Common.foreground then Lwt_unix.daemonize ~keep_stderr:true ();
+
lwt card = Card.open_card ~vendor_id:Protocol.usb_vid ~product_id:Protocol.usb_pid_proximity_sensor
and bus = Lazy.force OBus_bus.system in
@@ -136,6 +138,4 @@ let () = Lwt_main.run begin
]
in
- if not !Common.foreground then Lwt_unix.daemonize ();
fst (Lwt.wait ())
-end
hooks/post-receive
--
krobot
|