#include <cutils/log.h>
#include <cutils/properties.h>
-extern "C" int logwrap(int argc, const char **argv, int background);
+extern "C" int logwrap(int argc, const char **argv);
extern "C" int system_nosh(const char *command);
#include "BandwidthController.h"
}
argv[argc] = NULL;
- res = logwrap(argc, argv, 0);
+ res = logwrap(argc, argv);
}
if (res) {
ALOGE("runIptablesCmd(): failed %s res=%d", fullCmd.c_str(), res);
#include "PppController.h"
-extern "C" int logwrap(int argc, const char **argv, int background);
-
PppController::PppController() {
mTtys = new TtyCollection();
mPid = 0;
_exit(1);
}
-int logwrap(int argc, const char* argv[], int background)
+int logwrap(int argc, const char* argv[])
{
pid_t pid;
dup2(child_ptty, 2);
close(child_ptty);
- if (background) {
- int fd = open("/dev/cpuctl/bg_non_interactive/tasks", O_WRONLY);
- if (fd >= 0) {
- char text[64];
- sprintf(text, "%d", getpid());
- if (write(fd, text, strlen(text)) < 0) {
- ALOG(LOG_WARN, "logwrapper",
- "Unable to background process (%s)", strerror(errno));
- }
- close(fd);
- } else {
- ALOG(LOG_WARN, "logwrapper",
- "Unable to background process (%s)", strerror(errno));
- }
- }
-
child(argc, argv);
} else {
/*