From 6fbe0e44d63d2ce556e9b929dad81878ae4d5155 Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 20 Jan 2005 12:30:35 +0000 Subject: [PATCH] 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 --- src/FbCommands.cc | 4 ++-- util/fbrun/FbRun.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FbCommands.cc b/src/FbCommands.cc index fbe41bdc..8d574565 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -131,11 +131,11 @@ void ExecuteCmd::execute() { displaystring += intbuff; setsid(); putenv(const_cast(displaystring.c_str())); - execl("/bin/sh", "/bin/sh", "-c", m_cmd.c_str(), 0); + execl("/bin/sh", "/bin/sh", "-c", m_cmd.c_str(), static_cast(NULL)); exit(0); } #else // __EMX__ - spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), 0); + spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), static_cast(NULL)); #endif // !__EMX__ } diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index da3ee6b4..118b82d6 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc @@ -117,7 +117,7 @@ void FbRun::run(const std::string &command) { // fork and execute program if (!fork()) { setsid(); - execl("/bin/sh", "/bin/sh", "-c", command.c_str(), 0); + execl("/bin/sh", "/bin/sh", "-c", command.c_str(), static_cast(NULL)); exit(0); //exit child }