Searched refs:pid (Results 1 - 25 of 217) sorted by last modified time

123456789

/system/vold/
H A DCommandListener.cpp321 int pid = Process::getPid(de->d_name); local
323 if (pid < 0) {
328 Process::getProcessName(pid, processName, sizeof(processName));
330 if (Process::checkFileDescriptorSymLinks(pid, argv[2]) ||
331 Process::checkFileMaps(pid, argv[2]) ||
332 Process::checkSymLink(pid, argv[2], "cwd") ||
333 Process::checkSymLink(pid, argv[2], "root") ||
334 Process::checkSymLink(pid, argv[2], "exe")) {
337 snprintf(msg, sizeof(msg), "%d %s", pid, processName);
675 pid_t pid,
673 runCommandInNamespace(const std::string& command, uid_t uid, pid_t pid, const std::string& path, int device_fd) argument
782 const pid_t pid = atoi(argv[3]); local
821 const uid_t pid = atoi(argv[3]); local
[all...]
H A DMoveTask.cpp96 pid_t pid = ForkExecvpAsync(cmd); local
97 if (pid == -1) return -1;
101 if (waitpid(pid, &status, WNOHANG) == pid) {
137 pid_t pid = ForkExecvpAsync(cmd); local
138 if (pid == -1) return -1;
142 if (waitpid(pid, &status, WNOHANG) == pid) {
H A DProcess.cpp66 void Process::getProcessName(int pid, char *buffer, size_t max) { argument
68 snprintf(buffer, max, "/proc/%d/cmdline", pid);
79 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint) { argument
80 return checkFileDescriptorSymLinks(pid, mountPoint, NULL, 0);
83 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max) { argument
88 sprintf(path, "/proc/%d/fd", pid);
124 int Process::checkFileMaps(int pid, const char *mountPoint) { argument
125 return checkFileMaps(pid, mountPoint, NULL, 0);
128 int Process::checkFileMaps(int pid, const char *mountPoint, char *openFilename, size_t max) { argument
132 sprintf(buffer, "/proc/%d/maps", pid);
154 checkSymLink(int pid, const char *mountPoint, const char *name) argument
191 int pid = getPid(de->d_name); local
[all...]
H A DProcess.h26 static int checkSymLink(int pid, const char *path, const char *name);
27 static int checkFileMaps(int pid, const char *path);
28 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max);
29 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint);
30 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max);
31 static void getProcessName(int pid, char *buffer, size_t max);
H A DUtils.cpp330 pid_t pid = fork(); local
331 if (pid == 0) {
343 if (pid == -1) {
348 return pid;
/system/tpm/trunks/ftdi/
H A Dmpsse.c63 mpsse = Open(supported_devices[i].vid, supported_devices[i].pid, mode,
78 * @pid - Device product ID.
89 int pid,
96 return OpenIndex(vid, pid, mode, freq, endianess, interface, description,
104 * @pid - Device product ID.
118 int pid,
148 if (!ftdi_usb_open_desc_index(&mpsse->ftdi, vid, pid, description, serial,
152 mpsse->pid = pid;
500 int pid local
88 Open(int vid, int pid, enum modes mode, int freq, int endianess, int interface, const char* description, const char* serial) argument
117 OpenIndex(int vid, int pid, enum modes mode, int freq, int endianess, int interface, const char* description, const char* serial, int index) argument
[all...]
H A Dmpsse.h148 int pid; member in struct:vid_pid
159 int pid; member in struct:mpsse_context
180 int pid,
188 int pid,
/system/update_engine/common/
H A Dhttp_fetcher_unittest.cc130 LOG(INFO) << "started http server with pid " << http_server->pid();
H A Dsubprocess.cc187 pid_t pid = record->proc.pid(); local
188 CHECK(process_reaper_.WatchForChild(FROM_HERE, pid, base::Bind(
207 subprocess_records_[pid].reset(record.release());
208 return pid;
211 void Subprocess::KillExec(pid_t pid) { argument
212 auto pid_record = subprocess_records_.find(pid);
216 if (kill(pid, SIGTERM) != 0) {
217 PLOG(WARNING) << "Error sending SIGTERM to " << pid;
219 // Release the pid no
224 GetPipeFd(pid_t pid, int fd) const argument
[all...]
H A Dsubprocess.h79 void KillExec(pid_t pid);
81 // Return the parent end of the pipe mapped onto |fd| in the child |pid|. This
82 // file descriptor is available until the callback for the child |pid|
86 int GetPipeFd(pid_t pid, int fd) const;
H A Dsubprocess_unittest.cc100 pid_t* pid,
109 int fd = subprocess->GetPipeFd(*pid, child_fd);
156 pid_t pid; local
157 pid = subprocess_.ExecFlags(
161 base::Bind(&ExpectedDataOnPipe, &subprocess_, &pid, 3, "on pipe\n", 0));
162 EXPECT_NE(0, pid);
165 EXPECT_EQ(-1, subprocess_.GetPipeFd(pid, 123));
168 EXPECT_EQ(-1, subprocess_.GetPipeFd(pid, 3));
99 ExpectedDataOnPipe(const Subprocess* subprocess, pid_t* pid, int child_fd, const string& child_fd_data, int expected_return_code, int return_code, const string& ) argument
H A Dutils.cc951 pid_t pid = fork(); local
952 CHECK_GE(pid, 0) << "fork failed"; // fork() failed. Something is very wrong.
953 if (pid == 0) {
958 pid_t result = waitpid(pid, nullptr, 0);
/system/security/keystore/
H A Dpermissions.cpp61 pid_t pid; member in struct:audit_data
82 snprintf(buf, len, "pid=%d uid=%d", ad->pid, ad->uid);
123 ALOGE("SELinux: Failed to get source pid context.\n");
127 ad.pid = spid;
/system/netd/server/
H A DClatdController.cpp52 pid_t pid = getClatdPid(interface); local
54 if (pid != 0) {
55 ALOGE("clatd pid=%d already started on %s", pid, interface);
85 if ((pid = fork()) < 0) {
90 if (!pid) {
109 mClatdPids[interface] = pid;
117 pid_t pid = getClatdPid(interface); local
119 if (pid == 0) {
124 ALOGD("Stopping clatd pid
137 pid_t pid = getClatdPid(interface); local
[all...]
H A DNetdNativeService.cpp50 pid_t pid; local
53 if (checkCallingPermission(String16(permission), (int32_t *) &pid, (int32_t *) &uid)) {
56 auto err = StringPrintf("UID %d / PID %d lacks permission %s", uid, pid, permission);
H A DPppController.cpp54 pid_t pid; local
74 if ((pid = fork()) < 0) {
79 if (!pid) {
105 mPid = pid;
H A DSoftapController.cpp60 pid_t pid = 1; local
71 if ((pid = fork()) < 0) {
76 if (!pid) {
86 mPid = pid;
H A DTetherController.cpp143 pid_t pid; local
155 if ((pid = fork()) < 0) {
162 if (!pid) {
182 args[6] = (char *)"--pid-file";
198 mDaemonPid = pid;
/system/netd/tests/
H A Dnetd_test.cpp184 pid = getpid();
411 int pid; member in class:ResolverTest
/system/extras/tests/cpueater/
H A Dcpueater.c30 pid_t pid; local
45 switch(pid = fork()) {
69 printf("%d\n", pid);
H A Ddaemonize.c33 int pid, fd, mode; local
84 switch(pid = fork()) {
104 switch(pid = fork()) {
117 waitpid(pid, &status, 0);
/system/extras/tests/kernel.config/
H A Daslr_test.cpp65 pid_t pid; local
74 if ((pid = fork()) < 0) {
79 } else if (pid > 0) {
H A Dsysvipc_test.cpp33 pid_t pid = getpid(); local
34 int ret = kcmp(pid, pid, KCMP_SYSVSEM, 0, 0);
36 EXPECT_EQ(-1, kcmp(pid, pid, KCMP_SYSVSEM, 0, 0));
/system/extras/tests/net_test/
H A Dnetlink.py44 NLMsgHdr = cstruct.Struct("NLMsgHdr", "=LHHLL", "length type flags seq pid")
140 self.pid = self.sock.getsockname()[1]
175 nlmsg = NLMsgHdr((length, command, flags, self.seq, self.pid)).Pack()
237 nlmsghdr = NLMsgHdr((length, command, flags, self.seq, self.pid))
/system/extras/tests/sdcard/
H A Dsdcard_perf_test.cpp148 // Print command line, pid, kernel version, OOM adj and scheduler.
308 pid_t *pid = (pid_t*)chunk; local
340 if (testCase->pid() != *pid)
342 fprintf(stderr, "Wrong pid found @ read block %x != %x\n", testCase->pid(), *pid);
359 *((pid_t *)chunk) = testCase->pid(); // write our pid at the beginning of each chunk
375 sprintf(filename, "%s/file-%d-%d", kTestDir, i, testCase->pid());
[all...]

Completed in 371 milliseconds

123456789