You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2021/10/03 12:04:45 UTC

[celix] branch feature/deadlock_on_stop_cmd updated: Small update in comments/doxygen

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/deadlock_on_stop_cmd
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/deadlock_on_stop_cmd by this push:
     new 44f2ed7  Small update in comments/doxygen
44f2ed7 is described below

commit 44f2ed72a94e2ced97816adca074f068e59eb40d
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Oct 3 14:04:35 2021 +0200

    Small update in comments/doxygen
---
 bundles/shell/shell_tui/gtest/src/ShellTuiTestSuite.cc | 4 ++--
 bundles/shell/shell_tui/src/activator.c                | 5 +++--
 bundles/shell/shell_tui/src/shell_tui.c                | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/bundles/shell/shell_tui/gtest/src/ShellTuiTestSuite.cc b/bundles/shell/shell_tui/gtest/src/ShellTuiTestSuite.cc
index ce129ed..ca15a4f 100644
--- a/bundles/shell/shell_tui/gtest/src/ShellTuiTestSuite.cc
+++ b/bundles/shell/shell_tui/gtest/src/ShellTuiTestSuite.cc
@@ -42,7 +42,7 @@ public:
             outputReadFd = fds[0];
             outputWriteFd = fds[1];
 
-            //set readFd non blocking
+            //set outputReadFd non blocking
             int flags = fcntl(outputReadFd, F_GETFL, 0);
             fcntl(outputReadFd, F_SETFL, flags | O_NONBLOCK);
         }
@@ -145,7 +145,7 @@ public:
 };
 
 TEST_F(ShellTuiTestSuite, testStartStop) {
-    //not empty, but should not leak
+    //simple start/stop bundles, but should not leak
     createFrameworkWithShellBundles();
 }
 
diff --git a/bundles/shell/shell_tui/src/activator.c b/bundles/shell/shell_tui/src/activator.c
index aff3682..3ae833d 100644
--- a/bundles/shell/shell_tui/src/activator.c
+++ b/bundles/shell/shell_tui/src/activator.c
@@ -60,11 +60,12 @@ static celix_status_t celix_shellTuiActivator_start(celix_shell_tui_activator_t*
     int outputFd = (int)celix_bundleContext_getPropertyAsLong(ctx, SHELL_TUI_OUTPUT_FILE_DESCRIPTOR, STDOUT_FILENO);
     int errorFd = (int)celix_bundleContext_getPropertyAsLong(ctx, SHELL_TUI_ERROR_FILE_DESCRIPTOR, STDERR_FILENO);
 
-    //Check if tty exists, no tty -> no shell tui expect if activateWithoutTTY==true
+    //Check if tty exists, no tty -> no shell (Expect - for testing - if the input fd is not STDIN_FILENO).
     if (inputFd == STDIN_FILENO && !isatty(STDIN_FILENO)) {
         celix_bundleContext_log(ctx, CELIX_LOG_LEVEL_INFO, "[Shell TUI] no tty connected. Shell TUI will not activate.");
         return status;
     }
+
     bool useCommands = false;
     char *term = getenv("TERM");
     useCommands = term != NULL; //if TERM exist, default is to use commands
@@ -97,4 +98,4 @@ static celix_status_t celix_shellTuiActivator_stop(celix_shell_tui_activator_t*
     return CELIX_SUCCESS;
 }
 
-CELIX_GEN_BUNDLE_ACTIVATOR(celix_shell_tui_activator_t, celix_shellTuiActivator_start, celix_shellTuiActivator_stop)
\ No newline at end of file
+CELIX_GEN_BUNDLE_ACTIVATOR(celix_shell_tui_activator_t, celix_shellTuiActivator_start, celix_shellTuiActivator_stop)
diff --git a/bundles/shell/shell_tui/src/shell_tui.c b/bundles/shell/shell_tui/src/shell_tui.c
index 3b5c658..a8f101b 100644
--- a/bundles/shell/shell_tui/src/shell_tui.c
+++ b/bundles/shell/shell_tui/src/shell_tui.c
@@ -445,7 +445,7 @@ static void writeLine(shell_tui_t* shellTui, const char* line, int pos) {
 }
 
 /**
- * @brief Will check if there is a match with the input and the fully qualified cmd name or local name.
+ * @brief Will check if there is a match with the input and the fully qualified cmd name or local cmd name.
  *
  * @return Return cmd or local cmd if there is a match with the input.
  */