+#if defined TIZEN_DEBUG_ENABLE
+static int __netconfig_handle_execute_file(const char *file_path,
+ char *const args[], char *const envs[])
+{
+ pid_t pid = 0;
+ int status = 0;
+ int rv = 0;
+ errno = 0;
+ register unsigned int index = 0;
+ char error_buf[MAX_SIZE_ERROR_BUFFER] = {0, };
+
+ while (args[index] != NULL) {
+ DBG("%s", args[index]);
+ index++;
+ }
+
+ if (!(pid = fork())) {
+ DBG("pid(%d), ppid (%d)", getpid(), getppid());
+ DBG("Inside child, exec (%s) command", file_path);
+
+ errno = 0;
+ if (execve(file_path, args, envs) == -1) {
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
+ DBG("Fail to execute command (%s)", error_buf);
+ exit(1);
+ }
+ } else if (pid > 0) {
+ if (waitpid(pid, &status, 0) == -1)
+ DBG("wait pid (%u) status (%d)", pid, status);
+
+ if (WIFEXITED(status)) {
+ rv = WEXITSTATUS(status);
+ DBG("exited, status=%d", rv);
+ } else if (WIFSIGNALED(status)) {
+ DBG("killed by signal %d", WTERMSIG(status));
+ } else if (WIFSTOPPED(status)) {
+ DBG("stopped by signal %d", WSTOPSIG(status));
+ } else if (WIFCONTINUED(status)) {
+ DBG("continued");
+ }
+
+ return rv;
+ }
+
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
+ DBG("failed to fork(%s)", error_buf);
+ return -EIO;
+}
+
+static int _start_dump()
+{
+ int rv = 0;
+ gchar *path = NETWORK_LOG_DUMP_SCRIPT;
+ char *const args[] = { NETWORK_LOG_DUMP_SCRIPT, NULL };
+ char *const envs[] = { NULL };
+
+ rv = __netconfig_handle_execute_file(path, args, envs);
+ if (rv < 0) {
+ ERR("Fail to execute network log dump shell");
+ return -EIO;
+ }
+ return 0;
+}
+#endif
+