diff --git a/menu.cpp b/menu.cpp
index 9682ec0..8f2c8b8 100644
--- a/menu.cpp
+++ b/menu.cpp
@@ -36,6 +36,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include "file_io.h"
#include "osd.h"
@@ -3936,6 +3937,11 @@ void HandleUI(void)
for (int i = 0; i < script_lines; i++) strcpy(script_output[i], "");
script_line=0;
script_exited = false;
+ cpu_set_t set;
+ CPU_ZERO(&set);
+ CPU_SET(0, &set);
+ CPU_SET(1, &set);
+ sched_setaffinity(0, sizeof(set), &set);
script_pipe=popen((parentstate != MENU_BTPAIR) ? getFullPath(SelectedPath) : "/usr/sbin/btpair", "r");
script_file = fileno(script_pipe);
fcntl(script_file, F_SETFL, O_NONBLOCK);
@@ -3962,6 +3968,10 @@ void HandleUI(void)
}
else {
pclose(script_pipe);
+ cpu_set_t set;
+ CPU_ZERO(&set);
+ CPU_SET(1, &set);
+ sched_setaffinity(0, sizeof(set), &set);
script_exited=true;
OsdWrite(OsdGetSize() - 1, " OK", menusub == 0, 0);
};
@@ -3975,6 +3985,10 @@ void HandleUI(void)
strcat(script_command, (parentstate == MENU_BTPAIR) ? "btpair" : flist_SelectedItem()->d_name);
system(script_command);
pclose(script_pipe);
+ cpu_set_t set;
+ CPU_ZERO(&set);
+ CPU_SET(1, &set);
+ sched_setaffinity(0, sizeof(set), &set);
script_exited = true;
};