diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-09-11 22:48:12 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-09-11 22:48:12 +0200 |
commit | 151046c5165860ddea6e84498cc0a0e191de1c40 (patch) | |
tree | 0f17c9583a049e5aa489ebc64d35b762b24723cb /src | |
parent | d032640ca5d776c15eff21ad804f5f34eb7b328a (diff) |
Add extra debug for the forked init and setup functions
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; } |