summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-11 22:48:12 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-11 22:48:12 +0200
commit151046c5165860ddea6e84498cc0a0e191de1c40 (patch)
tree0f17c9583a049e5aa489ebc64d35b762b24723cb /src/main.c
parentd032640ca5d776c15eff21ad804f5f34eb7b328a (diff)
Add extra debug for the forked init and setup functions
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 576c983a..cba908f7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -334,6 +334,7 @@ static void configure_device(int dev_id)
{
struct hci_dev_req dr;
struct hci_dev_info di;
+ pid_t pid;
int dd;
if (hci_devinfo(dev_id, &di) < 0)
@@ -343,7 +344,8 @@ static void configure_device(int dev_id)
return;
/* Do configuration in the separate process */
- switch (fork()) {
+ pid = fork();
+ switch (pid) {
case 0:
atexit(at_child_exit);
break;
@@ -351,6 +353,7 @@ static void configure_device(int dev_id)
error("Fork failed. Can't init device hci%d: %s (%d)",
dev_id, strerror(errno), errno);
default:
+ debug("configuration child %d forked", pid);
return;
}
@@ -430,10 +433,12 @@ static void configure_device(int dev_id)
static void init_device(int dev_id)
{
struct hci_dev_info di;
+ pid_t pid;
int dd;
/* Do initialization in the separate process */
- switch (fork()) {
+ pid = fork();
+ switch (pid) {
case 0:
atexit(at_child_exit);
break;
@@ -441,6 +446,7 @@ static void init_device(int dev_id)
error("Fork failed. Can't init device hci%d: %s (%d)",
dev_id, strerror(errno), errno);
default:
+ debug("initialization child %d forked", pid);
return;
}