Hi all,

I noticed that the tempget program, used by the temperature module,
would never exit e.g. when changing settings. Also, I had the problem
with the enlightenment splash screen sitting there until the timeout is
reached, that's already been reported on this (or anothere maybe) list
for some OSes (mine's NetBSD). It turns out that both issues have the
same cause:
_ecore_exe_exec_it runs tempget/enlightenment_init with a shell because
the command line contains shell metacharacters. Depending on which
shell is used, it will fork to run the actual command. Bash and zsh do
not and exec the command directly, other shells do. In the case of the
temperature module, it kills the shell used to run tempget, not tempget
itself. In the case of the splash screen enlightenment_init sends a
SIGUSR1 to the shell (killing it), not to enlightenment.
An easy fix is to prefix the command to run with "exec", i.e.

diff --git src/bin/e_init.c src/bin/e_init.c
index 202f104..4db1431 100644
--- src/bin/e_init.c
+++ src/bin/e_init.c
@@ -68,7 +68,7 @@ e_init_show(void)
    else ver = strdup("XvX");
 
    snprintf(buf, sizeof(buf),
-            "%s/enlightenment/utils/enlightenment_init \'%s\' \'%i\' \'%s\' 
\'%s\'",
+            "exec %s/enlightenment/utils/enlightenment_init \'%s\' \'%i\' 
\'%s\' \'%s\'",
             e_prefix_lib_get(), theme,
             e_config->font_hinting, tit, ver);
    printf("RUN INIT: %s\n", buf);
diff --git src/modules/temperature/e_mod_main.c 
src/modules/temperature/e_mod_main.c
index 52c6998..949487c 100644
--- src/modules/temperature/e_mod_main.c
+++ src/modules/temperature/e_mod_main.c
@@ -321,7 +321,7 @@ temperature_face_update_config(Config_Face *inst)
        if (!inst->tempget_exe) 
          {
             snprintf(buf, sizeof(buf),
-                     "%s/%s/tempget %i \"%s\" %i", 
+                     "exec %s/%s/tempget %i \"%s\" %i",
                      e_module_dir_get(temperature_config->module), 
MODULE_ARCH, 
                      inst->sensor_type,
                      (inst->sensor_name ? inst->sensor_name : "(null)"),
@@ -349,7 +349,7 @@ temperature_face_update_config(Config_Face *inst)
    if (!inst->tempget_exe) 
      {
        snprintf(buf, sizeof(buf),
-                "%s/%s/tempget %i \"%s\" %i", 
+                "exec %s/%s/tempget %i \"%s\" %i",
                 e_module_dir_get(temperature_config->module), MODULE_ARCH, 
                 inst->sensor_type,
                 (inst->sensor_name ? inst->sensor_name : "(null)"),


kind regards
dieter

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to