/third_party/curl/tests/ |
H A D | processhelp.pm | 90 # pidfromfile returns the pid stored in the given pidfile. The value 91 # of the returned pid will never be a negative value. It will be zero 92 # on any file related error or if a pid can not be extracted from the 97 my $pid = 0; 100 $pid = 0 + <$pidfh>; 102 $pid = 0 if($pid < 0); 104 return $pid; 108 # pidexists checks if a process with a given pid exists and is alive. 109 # This will return the positive pid i [all...] |
H A D | servers.pm | 116 my %serverpidfile; # all server pid file names, identified by server id 280 if($tryhandle =~ /^(\S+)\s+pid:\s+(\d+)\s+type:\s+(\w+)\s+([0-9A-F]+):\s+(.+)\r\r/) { 299 my $pid = $_[0]; 300 if((not defined $pid) || $pid <= 0) { 304 my $rc = pidwait($pid, &WNOHANG); 305 return ($rc == $pid)?1:0; 385 # Ugly hack but ssh client and gnutls-serv don't support pid files 390 logmsg "startnew: $pidfile faked with pid=$child\n" if($verbose); 393 logmsg "startnew: failed to write fake $pidfile with pid [all...] |
/third_party/musl/libc-test/src/functionalext/fortify/ |
H A D | invalid_param.c | 41 pid_t pid = fork(); in clearerr_0100() local 42 if (pid == -1) { in clearerr_0100() 44 } else if (pid == 0) { in clearerr_0100() 48 waitpid(pid, &status, 0); in clearerr_0100() 63 pid_t pid = fork(); in feof_0100() local 64 if (pid == -1) { in feof_0100() 66 } else if (pid == 0) { in feof_0100() 70 waitpid(pid, &status, 0); in feof_0100() 85 pid_t pid = fork(); in ferror_0100() local 86 if (pid in ferror_0100() 107 pid_t pid = fork(); fgetc_0100() local 129 pid_t pid = fork(); fgets_0100() local 152 pid_t pid = fork(); fprintf_0100() local 175 pid_t pid = fork(); fputc_0100() local 197 pid_t pid = fork(); fputs_0100() local 219 pid_t pid = fork(); fread_0600() local 242 pid_t pid = fork(); fscanf_0100() local 265 pid_t pid = fork(); fseek_0100() local 288 pid_t pid = fork(); fseeko_0100() local 310 pid_t pid = fork(); ftell_0100() local 332 pid_t pid = fork(); fwrite_0100() local 355 pid_t pid = fork(); getc_0100() local 377 pid_t pid = fork(); pclose_0100() local 399 pid_t pid = fork(); rewind_0100() local 421 pid_t pid = fork(); setvbuf_0100() local 444 pid_t pid = fork(); wcsnrtombs_0100() local 472 pid_t pid = fork(); unsetenv_0100() local 494 pid_t pid = fork(); readdir_0100() local 516 pid_t pid = fork(); pthread_join_0100() local 540 pid_t pid = fork(); pthread_kill_0100() local 564 pid_t pid = fork(); pthread_setschedparam_0100() local [all...] |
H A D | unistd.c | 42 int pid = fork(); in unistd_dynamic_chk_001() local 43 switch (pid) { in unistd_dynamic_chk_001() 51 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_001() 55 kill(pid, SIGCONT); in unistd_dynamic_chk_001() 81 int pid = fork(); in unistd_dynamic_chk_002() local 82 switch (pid) { in unistd_dynamic_chk_002() 90 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_002() 94 kill(pid, SIGCONT); in unistd_dynamic_chk_002() 121 int pid = fork(); in unistd_dynamic_chk_003() local 122 switch (pid) { in unistd_dynamic_chk_003() 162 int pid = fork(); unistd_dynamic_chk_004() local 202 int pid = fork(); unistd_dynamic_chk_005() local 241 int pid = fork(); unistd_dynamic_chk_006() local 280 int pid = fork(); unistd_dynamic_chk_007() local 321 int pid = fork(); unistd_dynamic_chk_008() local 361 int pid = fork(); unistd_dynamic_chk_009() local 399 int pid = fork(); unistd_dynamic_chk_010() local 437 int pid = fork(); unistd_dynamic_chk_011() local 477 int pid = fork(); unistd_dynamic_chk_012() local 517 int pid = fork(); unistd_dynamic_chk_013() local 555 int pid = fork(); unistd_dynamic_chk_014() local 592 int pid = fork(); unistd_dynamic_chk_015() local 629 int pid = fork(); unistd_dynamic_chk_016() local 667 int pid = fork(); unistd_dynamic_chk_017() local [all...] |
H A D | string_ext.c | 80 int pid = fork(); in test_strcat_0020() local 81 switch (pid) { in test_strcat_0020() 89 waitpid(pid, &status, WUNTRACED); in test_strcat_0020() 93 kill(pid, SIGCONT); in test_strcat_0020() 131 int pid = fork(); in test_strncat_0020() local 132 switch (pid) { in test_strncat_0020() 140 waitpid(pid, &status, WUNTRACED); in test_strncat_0020() 144 kill(pid, SIGCONT); in test_strncat_0020() 179 int pid = fork(); in test_stpcpy_0020() local 180 switch (pid) { in test_stpcpy_0020() 230 int pid = fork(); test_stpncpy_0020() local 280 int pid = fork(); test_strncpy_0020() local 327 int pid = fork(); test_memchr_0020() local 374 int pid = fork(); test_memrchr_0020() local 420 int pid = fork(); test_strchr_0020() local 468 int pid = fork(); test_strrchr_0020() local 517 int pid = fork(); test_strlcat_0020() local 569 int pid = fork(); test_strlcpy_0020() local 617 int pid = fork(); test_mempcpy_0020() local 652 int pid = fork(); test_mempcpy_0030() local 698 int pid = fork(); test_strcpy_0020() local 745 int pid = fork(); test_memmove_0020() local 791 int pid = fork(); test_memcpy_0020() local 838 int pid = fork(); test_memset_0020() local 872 int pid = fork(); test_strlen_0010() local 904 int pid = fork(); test_strlen_0020() local [all...] |
H A D | fcntl_ext.c | 63 int pid = fork(); in open_0020() local 64 switch (pid) { in open_0020() 72 waitpid(pid, &status, WUNTRACED); in open_0020() 76 kill(pid, SIGCONT); in open_0020() 97 int pid = fork(); in open_0030() local 98 switch (pid) { in open_0030() 106 waitpid(pid, &status, WUNTRACED); in open_0030() 110 kill(pid, SIGCONT); in open_0030() 159 int pid = fork(); in openat_0020() local 160 switch (pid) { in openat_0020() 193 int pid = fork(); openat_0030() local 256 int pid = fork(); open64_0020() local 290 int pid = fork(); open64_0030() local 352 int pid = fork(); openat64_0020() local 386 int pid = fork(); openat64_0030() local [all...] |
/base/hiviewdfx/hiview/framework/native/unified_collection/process/ |
H A D | process_status.cpp | 33 std::string ProcessStatus::GetProcessName(int32_t pid)
in GetProcessName() argument 41 if (processInfos_.find(pid) != processInfos_.end() && !processInfos_[pid].name.empty()) {
in GetProcessName() 42 return processInfos_[pid].name;
in GetProcessName() 44 std::string procName = CommonUtils::GetProcFullNameByPid(pid);
in GetProcessName() 45 if (UpdateProcessName(pid, procName)) {
in GetProcessName() 48 HIVIEW_LOGD("failed to get proc name from pid=%{public}d", pid);
in GetProcessName() 83 bool ProcessStatus::UpdateProcessName(int32_t pid, const std::string& procName)
in UpdateProcessName() argument 89 if (processInfos_.find(pid) ! in UpdateProcessName() 101 GetProcessState(int32_t pid) GetProcessState() argument 109 GetProcessLastForegroundTime(int32_t pid) GetProcessLastForegroundTime() argument 117 NotifyProcessState(int32_t pid, ProcessState procState) NotifyProcessState() argument 123 UpdateProcessState(int32_t pid, ProcessState procState) UpdateProcessState() argument 144 UpdateProcessForegroundState(int32_t pid) UpdateProcessForegroundState() argument 160 UpdateProcessBackgroundState(int32_t pid) UpdateProcessBackgroundState() argument 178 ClearProcessInfo(int32_t pid) ClearProcessInfo() argument [all...] |
/third_party/backends/sanei/ |
H A D | sanei_thread.c | 118 sanei_thread_set_invalid( SANE_Pid *pid ) in sanei_thread_set_invalid() 123 *pid = (pthread_t) 0; in sanei_thread_set_invalid() 125 pid->p = 0; in sanei_thread_set_invalid() 128 *pid = (pthread_t) -1; in sanei_thread_set_invalid() 135 sanei_thread_is_valid( SANE_Pid pid ) in sanei_thread_is_valid() 141 if (pid == 0) in sanei_thread_is_valid() 143 if (pid.p == 0) in sanei_thread_is_valid() 147 if (pid == (SANE_Pid) -1) in sanei_thread_is_valid() 159 sanei_thread_pid_to_long( SANE_Pid pid ) in sanei_thread_pid_to_long() 165 rc = (long) pid; in sanei_thread_pid_to_long() 218 SANE_Pid pid; sanei_thread_begin() local 234 sanei_thread_waitpid( SANE_Pid pid, int *status ) sanei_thread_waitpid() argument 242 sanei_thread_sendsig( SANE_Pid pid, int sig ) sanei_thread_sendsig() argument 271 SANE_Pid pid; sanei_thread_begin() local 291 sanei_thread_waitpid( SANE_Pid pid, int *status ) sanei_thread_waitpid() argument 302 sanei_thread_sendsig( SANE_Pid pid, int sig ) sanei_thread_sendsig() argument 388 eval_wp_result( SANE_Pid pid, int wpres, int pf ) eval_wp_result() argument 472 sanei_thread_sendsig( SANE_Pid pid, int sig ) sanei_thread_sendsig() argument 484 sanei_thread_waitpid( SANE_Pid pid, int *status ) sanei_thread_waitpid() argument [all...] |
/third_party/ltp/testcases/kernel/controllers/cpuctl_fj/ |
H A D | run_cpuctl_test_fj.sh | 132 ps -eo pid,rtprio > /tmp/pids_file1 & 138 while read pid 140 task=`cat $CPUCTL/tasks | grep "\b$pid\b"` 285 pid=$! 287 echo $pid > $CPUCTL/tmp/tasks 289 /bin/kill -s SIGUSR1 $pid 291 /bin/kill -s SIGUSR1 $pid 292 wait $pid 313 pid=$! 315 echo $pid > [all...] |
/base/hiviewdfx/faultloggerd/test/systemtest/ |
H A D | faultloggerd_system_test.cpp | 73 pid_t pid = fork(); in ForkAndExecuteCrasher() local 74 if (pid < 0) { in ForkAndExecuteCrasher() 76 return pid; in ForkAndExecuteCrasher() 77 } else if (pid == 0) { in ForkAndExecuteCrasher() 85 GTEST_LOG_(INFO) << "forked pid:" << pid; in ForkAndExecuteCrasher() 91 waitpid(pid, &status, WNOHANG); in ForkAndExecuteCrasher() 99 return pid; in ForkAndExecuteCrasher() 105 auto pid = ForkAndExecuteCrasher(option, type); in TriggerCrasherAndGetFileName() local 111 crashFileName = GetCppCrashFileName(pid, tempPat in TriggerCrasherAndGetFileName() 122 CheckCountNum(const string& filePath, const pid_t& pid, const string& option) CheckCountNum() argument 152 CheckCountNumAbort(const string& filePath, const pid_t& pid) CheckCountNumAbort() argument 164 CheckCountNumNullpointer(const string& filePath, const pid_t& pid) CheckCountNumNullpointer() argument 175 CheckCountNumStackOverFlow(const string& filePath, const pid_t& pid) CheckCountNumStackOverFlow() argument 186 CheckCountNumPCZero(const string& filePath, const pid_t& pid) CheckCountNumPCZero() argument 197 CheckCountNumOverStack(const string& filePath, const pid_t& pid) CheckCountNumOverStack() argument 208 CheckCountNumMultiThread(const string& filePath, const pid_t& pid) CheckCountNumMultiThread() argument 252 string pid; ReadRealPid() local 253 file >> pid; ReadRealPid() local 264 CheckCountNumStackTop(const string& filePath, const pid_t& pid) CheckCountNumStackTop() argument 281 CheckCppCrashAllLabelKeywords(const string& filePath, const pid_t& pid) CheckCppCrashAllLabelKeywords() argument 294 CheckCppCrashAsyncStackEnableKeywords(const string& filePath, const pid_t& pid) CheckCppCrashAsyncStackEnableKeywords() argument 306 CheckCppCrashAsyncStackDisableKeywords(const string& filePath, const pid_t& pid) CheckCppCrashAsyncStackDisableKeywords() argument 324 CheckTestGetCrashObj(const string& filePath, const pid_t& pid) CheckTestGetCrashObj() argument 346 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 366 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 386 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 406 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 426 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 446 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 466 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 486 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 506 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 526 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 546 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 566 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 586 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 606 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 626 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 646 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 666 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 686 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 706 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 726 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 746 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 766 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 786 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 806 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 826 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 846 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 866 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 886 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 905 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 925 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 945 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName, 2); // 2 : sleep 2s for waiting cppcrash file HWTEST_F() local 965 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName, 2); // 2 : sleep 2s for waiting cppcrash file HWTEST_F() local 985 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1005 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1025 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1045 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1190 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1226 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1246 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1266 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1286 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1297 CheckMinidebugSymbols(const string& filePath, const pid_t& pid, const string& option) CheckMinidebugSymbols() argument 1328 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1348 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1368 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_C, fileName); HWTEST_F() local 1388 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1409 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1430 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1450 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1470 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1490 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1510 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1530 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1550 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1570 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1590 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1617 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName, 1, crashDir); HWTEST_F() local 1640 pid_t pid = TriggerCrasherAndGetFileName(cmd, CRASHER_CPP, fileName); HWTEST_F() local 1663 int pid = LaunchTestHap(testAbiltyName, testBundleName); HWTEST_F() local [all...] |
/base/hiviewdfx/faultloggerd/test/unittest/local_handler/ |
H A D | local_handler_test.cpp | 63 static bool CheckLocalCrashKeyWords(const string& filePath, pid_t pid, int sig) in CheckLocalCrashKeyWords() argument 65 if (filePath.empty() || pid <= 0) { in CheckLocalCrashKeyWords() 81 "Pid:" + to_string(pid), "Uid:", "name:./test_localhandler", in CheckLocalCrashKeyWords() 86 "Pid:" + to_string(pid), "Uid:", "name:./test_localhandler", in CheckLocalCrashKeyWords() 104 pid_t pid = fork(); in HWTEST_F() local 105 if (pid < 0) { in HWTEST_F() 107 } else if (pid == 0) { in HWTEST_F() 112 GTEST_LOG_(INFO) << "process(" << getpid() << ") is ready to kill process(" << pid << ")"; in HWTEST_F() 113 kill(pid, SIGILL); in HWTEST_F() 115 bool ret = CheckLocalCrashKeyWords(GetCppCrashFileName(pid), pi in HWTEST_F() 129 pid_t pid = fork(); HWTEST_F() local 154 pid_t pid = fork(); HWTEST_F() local 179 pid_t pid = fork(); HWTEST_F() local 204 pid_t pid = fork(); HWTEST_F() local 229 pid_t pid = fork(); HWTEST_F() local 253 pid_t pid = fork(); HWTEST_F() local 415 pid_t pid = fork(); HWTEST_F() local [all...] |
/base/hiviewdfx/faultloggerd/test/unittest/signal_handler/ |
H A D | signal_handler_test.cpp | 61 static bool CheckThreadCrashKeyWords(const string& filePath, pid_t pid, int sig) in CheckThreadCrashKeyWords() argument 63 if (filePath.empty() || pid <= 0) { in CheckThreadCrashKeyWords() 77 "Pid:" + to_string(pid), "Uid:", "name:./test_signalhandler", sigKeyword, in CheckThreadCrashKeyWords() 84 static bool CheckCrashKeyWords(const string& filePath, pid_t pid, int sig) in CheckCrashKeyWords() argument 86 if (filePath.empty() || pid <= 0) { in CheckCrashKeyWords() 105 "Pid:" + to_string(pid), "Uid:", "name:./test_signalhandler", sigKeyword, in CheckCrashKeyWords() 144 pid_t pid = fork(); in HWTEST_F() local 145 if (pid < 0) { in HWTEST_F() 147 } else if (pid == 0) { in HWTEST_F() 154 GTEST_LOG_(INFO) << "process(" << getpid() << ") is ready to kill process(" << pid << ")"; in HWTEST_F() 171 pid_t pid = fork(); HWTEST_F() local 198 pid_t pid = fork(); HWTEST_F() local 225 pid_t pid = fork(); HWTEST_F() local 248 pid_t pid = fork(); HWTEST_F() local 271 pid_t pid = fork(); HWTEST_F() local 299 pid_t pid = fork(); HWTEST_F() local 349 pid_t pid = fork(); HWTEST_F() local 379 pid_t pid = fork(); HWTEST_F() local 413 pid_t pid = fork(); HWTEST_F() local 441 pid_t pid = fork(); HWTEST_F() local 475 pid_t pid = fork(); HWTEST_F() local [all...] |
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwind/ |
H A D | unwind_remote_benchmark.cpp | 64 static size_t UnwindRemote(pid_t pid, unw_addr_space_t as)
in UnwindRemote() argument 71 void *context = _UPT_create(pid);
in UnwindRemote() 104 pid_t pid = fork();
in Run() local 105 if (pid == 0) {
in Run() 108 } else if (pid < 0) {
in Run() 111 if (!DfxPtrace::Attach(pid)) {
in Run() 112 DFXLOGE("Failed to attach pid: %{public}d", pid);
in Run() 113 TestScopedPidReaper::Kill(pid);
in Run() 117 DFXLOGU("pid in Run() 133 GetCacheUnwind(pid_t pid, unw_addr_space_t& as) GetCacheUnwind() argument 147 pid_t pid = fork(); RunCache() local [all...] |
/third_party/ltp/testcases/kernel/numa/ |
H A D | numa01.sh | 30 local pid=$1 32 echo $(numastat -p $pid | sed '3q;d' | awk -F '[[:space:]][[:space:]]+' \ 43 local pid=$1 44 local index=$(echo "$(get_node_index $pid $2)") 46 local numstat=$(numastat -p $pid |awk '/^Total/ {print $'$index'}') 58 local pid=$1 60 local state=$(awk '{print $3}' /proc/$pid/stat) 96 pid=$! 98 TST_RETRY_FUNC "check_for_support_numa $pid" 0 100 mem_curr=$(get_mem_cur $pid [all...] |
/base/startup/appspawn/test/moduletest/ |
H A D | appspawn_module_test.cpp | 77 bool ReadFileInfo(char *buffer, const int32_t &pid, const char *fileName) in ReadFileInfo() argument 81 if (sprintf_s(filePath, sizeof(filePath), "/proc/%d/%s", pid, fileName) <= 0) { in ReadFileInfo() 110 bool CheckUid(const int32_t &pid, const int newUid) in CheckUid() argument 112 if (ReadFileInfo(g_buffer, pid, "status")) { in CheckUid() 113 GTEST_LOG_(INFO) << "CheckUid pid " << pid << " buffer :" << g_buffer; in CheckUid() 125 HILOG_INFO(LOG_CORE, "new proc(%{public}d) uid = %{public}d, setUid=%{public}d.", pid, uid, newUid); in CheckUid() 133 bool CheckGid(const int32_t &pid, const int newGid) in CheckGid() argument 135 if (ReadFileInfo(g_buffer, pid, "status")) { in CheckGid() 136 GTEST_LOG_(INFO) << "CheckGid pid " << pi in CheckGid() 160 GetGids(const int32_t &pid, std::vector<int32_t> &gids) GetGids() argument 194 CheckGids(const int32_t &pid, const std::vector<int32_t> newGids) CheckGids() argument 205 CheckGidsCount(const int32_t &pid, const std::vector<int32_t> newGids) CheckGidsCount() argument 216 CheckProcName(const int32_t &pid, const std::string &newProcessName) CheckProcName() argument 234 CheckProcessIsDestroyed(const int32_t &pid) CheckProcessIsDestroyed() argument [all...] |
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwindstack/ |
H A D | pid_utils.cpp | 39 static bool Exited(pid_t pid) in Exited() argument 42 pid_t waitPid = waitpid(pid, &status, WNOHANG); in Exited() 43 if (waitPid != pid) { in Exited() 48 DFXLOGE("%{public}d died: Process exited with code %{public}d", pid, WEXITSTATUS(status)); in Exited() 50 DFXLOGE("%{public}d died: Process exited due to signal %{public}d", pid, WTERMSIG(status)); in Exited() 52 DFXLOGE("%{public}d died: Process finished for unknown reason", pid); in Exited() 57 bool PidUtils::Quiesce(pid_t pid) in Quiesce() argument 62 if (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) == 0) { in Quiesce() 71 if (ptrace(PTRACE_LISTEN, pid, 0, 0) == -1) { in Quiesce() 78 DFXLOGE("%{public}d: Did not quiesce in 10 seconds", pid); in Quiesce() 82 Attach(pid_t pid) Attach() argument 106 Detach(pid_t pid) Detach() argument 115 WaitForPidState(pid_t pid, const std::function<PidRunEnum()>& stateCheckFunc) WaitForPidState() argument 140 WaitForPidStateAfterAttach(pid_t pid, const std::function<PidRunEnum()>& stateCheckFunc) WaitForPidStateAfterAttach() argument [all...] |
/third_party/ltp/include/ |
H A D | tst_sched.h | 21 static inline int sys_sched_setparam(pid_t pid, const struct sched_param *param) in sys_sched_setparam() argument 23 return tst_syscall(__NR_sched_setparam, pid, param); in sys_sched_setparam() 26 static inline int sys_sched_getparam(pid_t pid, struct sched_param *param) in sys_sched_getparam() argument 28 return tst_syscall(__NR_sched_getparam, pid, param); in sys_sched_getparam() 31 static inline int sys_sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) in sys_sched_setscheduler() argument 33 return tst_syscall(__NR_sched_setscheduler, pid, policy, param); in sys_sched_setscheduler() 36 static inline int sys_sched_getscheduler(pid_t pid) in sys_sched_getscheduler() argument 38 return tst_syscall(__NR_sched_getscheduler, pid); in sys_sched_getscheduler() 41 static inline int libc_sched_setparam(pid_t pid, const struct sched_param *param) in libc_sched_setparam() argument 43 return TST_LIBC_SCHED_SCALL_(sched_setparam, pid, para in libc_sched_setparam() 46 libc_sched_getparam(pid_t pid, struct sched_param *param) libc_sched_getparam() argument 51 libc_sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) libc_sched_setscheduler() argument 56 libc_sched_getscheduler(pid_t pid) libc_sched_getscheduler() argument [all...] |
/base/security/security_component_manager/services/security_component_service/sa/sa_main/ |
H A D | app_state_observer.cpp | 35 bool AppStateObserver::IsProcessForeground(int32_t pid, int32_t uid) in IsProcessForeground() argument 39 if (pid == iter->pid) { in IsProcessForeground() 43 if ((iter->pid == -1) && (uid == iter->uid)) { in IsProcessForeground() 44 iter->pid = pid; in IsProcessForeground() 51 void AppStateObserver::AddProcessToForegroundSet(int32_t pid, const SecCompProcessData& data) in AddProcessToForegroundSet() argument 55 if (pid == -1) { in AddProcessToForegroundSet() 60 } else if (pid == iter->pid) { in AddProcessToForegroundSet() [all...] |
/third_party/cups-filters/filter/foomatic-rip/ |
H A D | process.c | 37 pid_t pid; member 49 void add_process(const char *name, int pid, int isgroup) in add_process() argument 53 if (procs[i].pid == -1) { in add_process() 55 procs[i].pid = pid; in add_process() 63 int find_process(int pid) in find_process() argument 67 if (procs[i].pid == pid) in find_process() 76 procs[i].pid = -1; in clear_proc_list() 84 if (procs[i].pid in kill_all_processes() 99 pid_t pid; _start_process() local 202 wait_for_process(int pid) wait_for_process() argument 226 int pid = start_system_process(name, command, NULL, NULL); run_system_process() local [all...] |
/third_party/ltp/testcases/kernel/sched/hyperthreading/ht_affinity/ |
H A D | ht_affinity.c | 29 int set_affinity(pid_t pid, unsigned int len, unsigned long *mask_ptr) 30 pid - pid of the process whose affinity is desired to be set. 34 int get_affinity(pid_t pid, unsigned int len, unsigned long *mask_ptr) 35 pid - pid of the process whose affinity is being read. 43 #define sched_setaffinity(pid, cpusetsize, mask) syscall(__NR_sched_setaffinity, pid, cpusetsize, mask) 44 #define sched_getaffinity(pid, cpusetsize, mask) syscall(__NR_sched_getaffinity, pid, cpusetsiz 52 pid_t pid; HT_SetAffinity() local 129 get_porc_affinity(pid_t pid) get_porc_affinity() argument 151 pid_t pid; HT_GetAffinity() local 183 pid_t pid; HT_InheritAffinity() local [all...] |
/base/hiviewdfx/hiview/framework/native/unified_collection/graphic_memory/ |
H A D | graphic_memory.cpp | 36 uint32_t pid = 0; member 42 int32_t MemoryTrackerGetGLByPid(int32_t pid) in MemoryTrackerGetGLByPid() argument 50 if (memtrack->GetDevMem(pid, MEMORY_TRACKER_TYPE_GL, records) != HDF_SUCCESS) { in MemoryTrackerGetGLByPid() 62 int32_t RsGetGLByPid(int32_t pid) in RsGetGLByPid() argument 66 std::make_unique<MemoryGraphic>(RSInterfaces::GetInstance().GetMemoryGraphic(pid)); in RsGetGLByPid() 73 int32_t GetGLByPid(int32_t pid) in GetGLByPid() argument 75 return MemoryTrackerGetGLByPid(pid) + RsGetGLByPid(pid); in GetGLByPid() 83 name, sizeof(name), &dmaInfo.pid, &dmaInfo.size, &dmaInfo.ino) == 0) { in CreateDmaInfo() 93 it->second.pid in CreateDmaInfo() 97 GetGraphByPid(pid_t pid) GetGraphByPid() argument 118 GetGraphicUsage(int32_t pid, Type type) GetGraphicUsage() argument [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/ |
H A D | dfx_dump_catcher.cpp | 108 bool DfxDumpCatcher::DoDumpLocalPid(int pid, std::string& msg, size_t maxFrameNums) in DoDumpLocalPid() argument 111 if (pid <= 0) { in DoDumpLocalPid() 137 bool DfxDumpCatcher::DoDumpRemoteLocked(int pid, int tid, std::string& msg, bool isJson, int timeout) in DoDumpRemoteLocked() argument 139 return DoDumpCatchRemote(pid, tid, msg, isJson, timeout); in DoDumpRemoteLocked() 142 bool DfxDumpCatcher::DoDumpLocalLocked(int pid, int tid, std::string& msg, size_t maxFrameNums) in DoDumpLocalLocked() argument 149 ret = DoDumpLocalPid(pid, msg, maxFrameNums); in DoDumpLocalLocked() 151 if (!IsThreadInPid(pid, tid)) { in DoDumpLocalLocked() 152 msg.append("tid(" + std::to_string(tid) + ") is not in pid(" + std::to_string(pid) + ").\n"); in DoDumpLocalLocked() 162 static void ReportDumpCatcherStats(int32_t pid, in ReportDumpCatcherStats() argument 215 DumpCatchProcess(int pid, std::string& msg, size_t maxFrameNums, bool isJson) DumpCatchProcess() argument 229 DumpCatch(int pid, int tid, std::string& msg, size_t maxFrameNums, bool isJson) DumpCatch() argument 274 DumpCatchFd(int pid, int tid, std::string& msg, int fd, size_t maxFrameNums) DumpCatchFd() argument 284 DoDumpCatchRemote(int pid, int tid, std::string& msg, bool isJson, int timeout) DoDumpCatchRemote() argument 334 DoDumpRemotePid(int pid, std::string& msg, bool isJson, int32_t timeout) DoDumpRemotePid() argument 363 CollectKernelStack(pid_t pid, int waitMilliSeconds) CollectKernelStack() argument 408 AsyncGetAllTidKernelStack(pid_t pid, int waitMilliSeconds) AsyncGetAllTidKernelStack() argument 596 int pid = pidV[i]; DumpCatchMultiPid() local [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | wait4.c | 36 pid_t pid = fork(); in wait4_0100() local 37 if (pid > 0) { in wait4_0100() 41 pid_t wait4_for_pind = wait4(pid, &status, options, &ru); in wait4_0100() 42 if (wait4_for_pind != pid) { in wait4_0100() 43 t_error("%s wait4 get pid is %d are not want %d\n", __func__, wait4_for_pind, pid); in wait4_0100() 48 } else if (pid == 0) { in wait4_0100() 63 pid_t pid = fork(); in wait4_0200() local 64 if (pid > 0) { in wait4_0200() 68 pid_t wait4_for_pind = wait4(pid, in wait4_0200() 90 pid_t pid = fork(); wait4_time64_0100() local [all...] |
/base/sensors/sensor/services/src/ |
H A D | sensor_power_policy.cpp | 45 ErrCode SensorPowerPolicy::SuspendSensors(int32_t pid) in SuspendSensors() argument 48 std::vector<int32_t> sensorIdList = clientInfo_.GetSensorIdByPid(pid); in SuspendSensors() 50 SEN_HILOGD("Suspend sensors failed, sensorIdList is empty, pid:%{public}d", pid); in SuspendSensors() 54 auto pidSensorInfoIt = pidSensorInfoMap_.find(pid); in SuspendSensors() 57 if (!Suspend(pid, sensorIdList, sensorInfoMap)) { in SuspendSensors() 58 SEN_HILOGE("Suspend part sensors, but some failed, pid:%{public}d", pid); in SuspendSensors() 61 SEN_HILOGI("Suspend sensors success, pid:%{public}d", pid); in SuspendSensors() 75 Suspend(int32_t pid, const std::vector<int32_t> &sensorIdList, std::unordered_map<int32_t, SensorBasicInfo> &sensorInfoMap) Suspend() argument 104 ResumeSensors(int32_t pid) ResumeSensors() argument 136 Resume(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) Resume() argument 170 RestoreSensorInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) RestoreSensorInfo() argument 195 int32_t pid = pidSensorInfo.first; GetSuspendPidList() local 219 GetActiveInfoList(int32_t pid) GetActiveInfoList() argument [all...] |
/base/hiviewdfx/hidumper/test/innerkits_test/ |
H A D | main.cpp | 22 static uint64_t GetPss(const int &pid) in GetPss() argument 25 return dumpUsage->GetPss(pid); in GetPss() 28 static uint64_t GetPrivateDirty(const int &pid) in GetPrivateDirty() argument 31 return dumpUsage->GetPrivateDirty(pid); in GetPrivateDirty() 34 static uint64_t GetSharedDirty(const int &pid) in GetSharedDirty() argument 37 return dumpUsage->GetSharedDirty(pid); in GetSharedDirty() 40 static bool GetMemInfo(const int &pid, OHOS::HiviewDFX::MemInfoData::MemInfo &data) in GetMemInfo() argument 43 return dumpUsage->GetMemInfo(pid, data); in GetMemInfo() 47 static float GetCpuUsage(const int &pid) in GetCpuUsage() argument 50 return dumpUsage->GetCpuUsage(pid); in GetCpuUsage() 56 int pid; main() local 58 cin >> pid; main() local [all...] |