[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbox
Subject:    [PATCH] Fix broken execlp();
From:       mmj () panther ! mmj ! dk (Mads Martin Joergensen)
Date:       2005-04-01 12:34:33
Message-ID: 20050401123433.GF37259 () mmj ! dk
[Download RAW message or body]

Hey Mikael,

Without this patch there's no guarantee for what's going to happen with
that execlp if it executed.

--- openbox-3.2/openbox/openbox.c
+++ openbox-3.2/openbox/openbox.c
@@ -326,7 +326,8 @@
 
         /* re-run me */
         execvp(argv[0], argv); /* try how we were run */
-        execlp(argv[0], g_path_get_basename(argv[0])); /* last resort */
+        execlp(argv[0], g_path_get_basename(argv[0]),
+                       (char *)NULL); /* last resort */
     }
      
     return exitcode;

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic