Skip to content

Commit

Permalink
Import patch from upstream pull request to stop easystroke creating
Browse files Browse the repository at this point in the history
zombie processes for each spawned process.

Obtained from:	thjaeger/easystroke#6


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@531758 35697150-7ecd-e111-bb59-0022644237b5
  • Loading branch information
madpilot78 committed Apr 15, 2020
1 parent 8897ad4 commit 5fa2e30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deskutils/easystroke/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= easystroke
PORTVERSION= 0.6.0
PORTREVISION= 21
PORTREVISION= 22
CATEGORIES= deskutils
MASTER_SITES= SF

Expand Down
20 changes: 20 additions & 0 deletions deskutils/easystroke/files/patch-actiondb.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- actiondb.cc.orig 2013-03-27 15:52:38 UTC
+++ actiondb.cc
@@ -118,14 +118,9 @@ template<class Archive> void StrokeInfo::serialize(Arc
using namespace std;

void Command::run() {
- pid_t pid = fork();
- switch (pid) {
- case 0:
- execlp("/bin/sh", "sh", "-c", cmd.c_str(), NULL);
- 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 {

0 comments on commit 5fa2e30

Please sign in to comment.