diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-09-28 08:28:47 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-09-28 08:28:47 +0300 |
commit | 4e58eab1fa3ac6ae722a328143585fa0c1ad6f15 (patch) | |
tree | 6c5125ee7684f415eef68b77d25492b35d88f662 /main/cpulimit/fix-crash-on-sigquit.patch | |
parent | adccaaa33a873c4140d00a41efe8b7d38100658c (diff) | |
download | aports-4e58eab1fa3ac6ae722a328143585fa0c1ad6f15.tar.bz2 aports-4e58eab1fa3ac6ae722a328143585fa0c1ad6f15.tar.xz |
main/cpulimit: moved from testing
Diffstat (limited to 'main/cpulimit/fix-crash-on-sigquit.patch')
-rw-r--r-- | main/cpulimit/fix-crash-on-sigquit.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/main/cpulimit/fix-crash-on-sigquit.patch b/main/cpulimit/fix-crash-on-sigquit.patch new file mode 100644 index 000000000..d406dec2e --- /dev/null +++ b/main/cpulimit/fix-crash-on-sigquit.patch @@ -0,0 +1,27 @@ +Only in cpulimit.fix/: core +Only in cpulimit.fix/: src/cpulimit +--- cpulimit/src/cpulimit.c ++++ cpulimit.fix/src/cpulimit.c +@@ -89,11 +89,13 @@ + { + //let all the processes continue if stopped + struct list_node *node = NULL; +- for (node=pgroup.proclist->first; node!= NULL; node=node->next) { +- struct process *p = (struct process*)(node->data); +- kill(p->pid, SIGCONT); ++ if (pgroup.proclist) { ++ for (node=pgroup.proclist->first; node!= NULL; node=node->next) { ++ struct process *p = (struct process*)(node->data); ++ kill(p->pid, SIGCONT); ++ } ++ close_process_group(&pgroup); + } +- close_process_group(&pgroup); + //fix ^C little problem + printf("\r"); + fflush(stdout); +Only in cpulimit.fix/: src/list.o +Only in cpulimit.fix/: src/process_group.o +Only in cpulimit.fix/: src/process_iterator.o +Only in cpulimit.fix/: tests/busy +Only in cpulimit.fix/: tests/process_iterator_test |