| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/deskutils/easystroke/files/ |
Upload File : |
--- actiondb.cc.orig 2016-07-05 18:32:44 UTC
+++ actiondb.cc
@@ -119,14 +119,9 @@ void Command::run() {
using namespace std;
void Command::run() {
- pid_t pid = fork();
- switch (pid) {
- case 0:
- execlp("/bin/sh", "sh", "-c", cmd.c_str(), nullptr);
- exit(1);
- case -1:
- printf(_("Error: can't execute command \"%s\": fork() failed\n"), cmd.c_str());
- }
+ gchar* argv[] = {(gchar*) "/bin/sh", (gchar*) "-c", NULL, NULL};
+ argv[2] = (gchar *) cmd.c_str();
+ g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
}
ButtonInfo Button::get_button_info() const {