aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2005-01-20 12:30:35 (GMT)
committermathias <mathias>2005-01-20 12:30:35 (GMT)
commit6fbe0e44d63d2ce556e9b929dad81878ae4d5155 (patch)
tree2e704d61ece89117435b1d01cec00c79f077a26c
parent52a8360e5b44d84198d46b59ca51a79887812908 (diff)
downloadfluxbox_paul-6fbe0e44d63d2ce556e9b929dad81878ae4d5155.zip
fluxbox_paul-6fbe0e44d63d2ce556e9b929dad81878ae4d5155.tar.bz2
applied patches from openbsd-ports, closed #1105041 (sf)
execl needs a terminating NULL at the end, a '0' would be converted to "int 0" on 64bit-systems
-rw-r--r--src/FbCommands.cc4
-rw-r--r--util/fbrun/FbRun.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index fbe41bd..8d57456 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -131,11 +131,11 @@ void ExecuteCmd::execute() {
131 displaystring += intbuff; 131 displaystring += intbuff;
132 setsid(); 132 setsid();
133 putenv(const_cast<char *>(displaystring.c_str())); 133 putenv(const_cast<char *>(displaystring.c_str()));
134 execl("/bin/sh", "/bin/sh", "-c", m_cmd.c_str(), 0); 134 execl("/bin/sh", "/bin/sh", "-c", m_cmd.c_str(), static_cast<void*>(NULL));
135 exit(0); 135 exit(0);
136 } 136 }
137#else // __EMX__ 137#else // __EMX__
138 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), 0); 138 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), static_cast<void*>(NULL));
139#endif // !__EMX__ 139#endif // !__EMX__
140 140
141} 141}
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index da3ee6b..118b82d 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -117,7 +117,7 @@ void FbRun::run(const std::string &command) {
117 // fork and execute program 117 // fork and execute program
118 if (!fork()) { 118 if (!fork()) {
119 setsid(); 119 setsid();
120 execl("/bin/sh", "/bin/sh", "-c", command.c_str(), 0); 120 execl("/bin/sh", "/bin/sh", "-c", command.c_str(), static_cast<void*>(NULL));
121 exit(0); //exit child 121 exit(0); //exit child
122 } 122 }
123 123