/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...] |
/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...] |
/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/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/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...] |
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_common/ |
H A D | wifi_permission_helper.cpp | 28 int WifiPermissionHelper::VerifyPermission(const std::string &permissionName, const int &pid, in VerifyPermission() argument 34 if (uid == static_cast<int>(getuid()) && pid == static_cast<int>(getpid())) { in VerifyPermission() 49 LOGE("has no permission_name=%{public}s, pid=%{public}d, uid=%{public}d", permissionName.c_str(), pid, uid); in VerifyPermission() 54 int WifiPermissionHelper::VerifySameProcessPermission(const int &pid, const int &uid) in VerifySameProcessPermission() argument 59 if (uid == static_cast<int>(getuid()) && pid == static_cast<int>(getpid())) { in VerifySameProcessPermission() 66 int WifiPermissionHelper::VerifySetWifiInfoPermission(const int &pid, const int &uid) in VerifySetWifiInfoPermission() argument 68 if (VerifyPermission("ohos.permission.SET_WIFI_INFO", pid, uid, 0) == PERMISSION_DENIED) { in VerifySetWifiInfoPermission() 74 int WifiPermissionHelper::VerifyGetWifiInfoPermission(const int &pid, const int &uid) in VerifyGetWifiInfoPermission() argument 76 if (VerifyPermission("ohos.permission.GET_WIFI_INFO", pid, ui in VerifyGetWifiInfoPermission() 82 VerifySetWifiConfigPermission(const int &pid, const int &uid) VerifySetWifiConfigPermission() argument 90 VerifyGetWifiConfigPermission(const int &pid, const int &uid) VerifyGetWifiConfigPermission() argument 98 VerifyGetScanInfosPermission(const int &pid, const int &uid) VerifyGetScanInfosPermission() argument 106 VerifyGetWifiLocalMacPermission(const int &pid, const int &uid) VerifyGetWifiLocalMacPermission() argument 114 VerifyWifiConnectionPermission(const int &pid, const int &uid) VerifyWifiConnectionPermission() argument 122 VerifyGetWifiDirectDevicePermission(const int &pid, const int &uid) VerifyGetWifiDirectDevicePermission() argument 130 VerifyManageWifiHotspotPermission(const int &pid, const int &uid) VerifyManageWifiHotspotPermission() argument 138 VerifyGetWifiPeersMacPermission(const int &pid, const int &uid) VerifyGetWifiPeersMacPermission() argument 146 VerifyGetWifiPeersMacPermissionEx(const int &pid, const int &uid, const int &tokenId) VerifyGetWifiPeersMacPermissionEx() argument 154 VerifyGetWifiInfoInternalPermission(const int &pid, const int &uid) VerifyGetWifiInfoInternalPermission() argument 162 VerifyManageWifiHotspotExtPermission(const int &pid, const int &uid) VerifyManageWifiHotspotExtPermission() argument [all...] |
H A D | wifi_auth_center.cpp | 79 int WifiAuthCenter::VerifySameProcessPermission(const int &pid, const int &uid) in VerifySameProcessPermission() argument 84 return WifiPermissionHelper::VerifySameProcessPermission(pid, uid); in VerifySameProcessPermission() 87 int WifiAuthCenter::VerifySetWifiInfoPermission(const int &pid, const int &uid) in VerifySetWifiInfoPermission() argument 92 return WifiPermissionHelper::VerifySetWifiInfoPermission(pid, uid); in VerifySetWifiInfoPermission() 95 int WifiAuthCenter::VerifyGetWifiInfoPermission(const int &pid, const int &uid) in VerifyGetWifiInfoPermission() argument 100 return WifiPermissionHelper::VerifyGetWifiInfoPermission(pid, uid); in VerifyGetWifiInfoPermission() 103 int WifiAuthCenter::VerifyGetScanInfosPermission(const int &pid, const int &uid) in VerifyGetScanInfosPermission() argument 108 return WifiPermissionHelper::VerifyGetScanInfosPermission(pid, uid); in VerifyGetScanInfosPermission() 111 int WifiAuthCenter::VerifyGetWifiLocalMacPermission(const int &pid, const int &uid) in VerifyGetWifiLocalMacPermission() argument 116 return WifiPermissionHelper::VerifyGetWifiLocalMacPermission(pid, ui in VerifyGetWifiLocalMacPermission() 119 VerifyWifiConnectionPermission(const int &pid, const int &uid) VerifyWifiConnectionPermission() argument 127 VerifySetWifiConfigPermission(const int &pid, const int &uid) VerifySetWifiConfigPermission() argument 135 VerifyGetWifiConfigPermission(const int &pid, const int &uid) VerifyGetWifiConfigPermission() argument 143 VerifyGetWifiDirectDevicePermission(const int &pid, const int &uid) VerifyGetWifiDirectDevicePermission() argument 151 VerifyManageWifiHotspotPermission(const int &pid, const int &uid) VerifyManageWifiHotspotPermission() argument 159 VerifyGetWifiPeersMacPermission(const int &pid, const int &uid) VerifyGetWifiPeersMacPermission() argument 167 VerifyGetWifiPeersMacPermissionEx(const int &pid, const int &uid, const int &tokenId) VerifyGetWifiPeersMacPermissionEx() argument 175 VerifyGetWifiInfoInternalPermission(const int &pid, const int &uid) VerifyGetWifiInfoInternalPermission() argument 183 VerifyManageWifiHotspotExtPermission(const int &pid, const int &uid) VerifyManageWifiHotspotExtPermission() argument [all...] |
H A D | wifi_permission_helper.h | 33 * @param pid - Process ID.[in] 37 static int VerifyPermission(const std::string &permissionName, const int &pid, const int &uid, const int &tokenId); 42 * @param pid - Process ID.[in] 46 static int VerifySameProcessPermission(const int &pid, const int &uid); 51 * @param pid - Process ID.[in] 55 static int VerifySetWifiInfoPermission(const int &pid, const int &uid); 60 * @param pid - Process ID.[in] 64 static int VerifyGetWifiInfoPermission(const int &pid, const int &uid); 69 * @param pid - Process ID.[in] 73 static int VerifyGetScanInfosPermission(const int &pid, cons [all...] |
/foundation/resourceschedule/ffrt/tools/ffrt_trace_process/ |
H A D | ffrt_trace_recover.py | 51 def make_costart_fake_log(mark, pid, label, gid, tid, tname, prio): 58 tname, tid, pid, cpu_id, timestamp, tname, tid, prio, label, pid, gid, prio) 63 def make_coyield_fake_log(mark, pid, label, gid, tid, tname, prio): 70 label, pid, gid, pid, cpu_id, timestamp, label, pid, gid, prio, tname, tid, prio) 74 (label, pid, gid, pid, cpu_id, timestamp, pid) [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...] |
/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...] |
/test/xts/acts/kernel_lite/process_posix/src/ |
H A D | ProcessTest.cpp | 42 pid_t pid; in HWTEST_F() local 46 pid = fork(); in HWTEST_F() 47 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno; in HWTEST_F() 48 if (pid == 0) { in HWTEST_F() 53 ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 1); in HWTEST_F() 68 pid_t pid; in HWTEST_F() local 70 pid = fork(); in HWTEST_F() 71 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno; in HWTEST_F() 72 if (pid == 0) { in HWTEST_F() 84 WaitProcExitedOK(pid); in HWTEST_F() 124 pid_t pid = fork(); HWTEST_F() local 152 pid_t pid; HWTEST_F() local 178 pid_t pid; HWTEST_F() local 234 pid_t pid = fork(); HWTEST_F() local 262 pid_t pid; HWTEST_F() local 284 pid_t pid = fork(); HWTEST_F() local 296 pid_t pid = fork(); FunctionAssertFalse() local 323 pid_t pid = fork(); HWTEST_F() local 363 pid_t pid = fork(); HWTEST_F() local 390 pid_t pid = fork(); HWTEST_F() local 417 pid_t pid = fork(); HWTEST_F() local 437 pid_t pid = fork(); HWTEST_F() local 462 pid_t pid = fork(); HWTEST_F() local 484 pid_t pid = fork(); HWTEST_F() 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...] |
/foundation/resourceschedule/frame_aware_sched/frameworks/core/frame_aware_policy/src/ |
H A D | intellisense_server.cpp | 99 void IntelliSenseServer::NewForeground(int pid, int uid) in NewForeground() argument 105 RME_LOGI("[ReportMessage]pid %{public}d change to foreground.", pid); in NewForeground() 107 iter->SetUiTid(pid); in NewForeground() 144 void IntelliSenseServer::NewBackground(int pid) in NewBackground() argument 147 RME_LOGI("[ReportMessage]pid %{public}d change to background.", pid); in NewBackground() 149 if (iter->GetAppPid() != pid) { in NewBackground() 161 void IntelliSenseServer::NewAppRecord(int pid, int uid) in NewAppRecord() argument 165 RME_LOGI("[NewAppRecord]pid in NewAppRecord() 174 NewDiedProcess(int pid) NewDiedProcess() argument 192 GetRecordOfPid(int pid) GetRecordOfPid() argument 202 ReportRenderThread(const int pid, const int uid, int renderTid) ReportRenderThread() argument 228 ReportContinuousTask(const int pid, const int uid, const int status) ReportContinuousTask() argument 247 ReportWindowFocus(const int pid, const int uid, int isFocus) ReportWindowFocus() argument 272 ReportCgroupChange(const int pid, const int uid, const int oldGroup, const int newGroup) ReportCgroupChange() argument 297 ReportAppInfo(const int pid, const int uid, const std::string bundleName, ThreadState state) ReportAppInfo() argument 309 ReportProcessInfo(const int pid, const int uid, const std::string bundleName, ThreadState state) ReportProcessInfo() argument 350 AuthAppKilled(int pid) AuthAppKilled() argument 360 AuthForeground(int pid) AuthForeground() argument 372 AuthBackground(int pid) AuthBackground() argument [all...] |
/foundation/graphic/graphic_2d/rosen/test/render/render/unittest/cmd/ |
H A D | rs_message_processor_test.cpp | 58 uint32_t pid = 1;
in HWTEST_F() local 59 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 63 pid = 0;
in HWTEST_F() 65 RSMessageProcessor::Instance().transactionMap_[pid] = transactionData;
in HWTEST_F() 66 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 77 uint32_t pid = 1;
in HWTEST_F() local 78 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 79 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 82 RSMessageProcessor::Instance().HasTransaction(pid);
in HWTEST_F() 83 EXPECT_NE(nullptr, RSMessageProcessor::Instance().GetTransaction(pid));
in HWTEST_F() 98 uint32_t pid = 1; HWTEST_F() local 120 uint32_t pid = 1; HWTEST_F() local 142 uint32_t pid = 10; HWTEST_F() local [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/command/ |
H A D | rs_message_processor_test.cpp | 46 uint32_t pid = 1;
in HWTEST_F() local 47 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 48 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 51 RSMessageProcessor::Instance().HasTransaction(pid);
in HWTEST_F() 52 EXPECT_NE(nullptr, RSMessageProcessor::Instance().GetTransaction(pid));
in HWTEST_F() 78 uint32_t pid = 1;
in HWTEST_F() local 79 RSMessageProcessor::Instance().AddUIMessage(pid, nullptr);
in HWTEST_F() 83 pid = 0;
in HWTEST_F() 85 RSMessageProcessor::Instance().transactionMap_[pid] = transactionData;
in HWTEST_F() 86 RSMessageProcessor::Instance().AddUIMessage(pid, nullpt in HWTEST_F() 98 uint32_t pid = 1; HWTEST_F() local 120 uint32_t pid = 10; HWTEST_F() local 138 uint32_t pid = 1; HWTEST_F() local [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...] |
/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...] |
/test/xts/acts/kernel_lite/dyload_posix/ |
H A D | ExecApiTest.cpp | 39 pid_t pid = fork();
in HWTEST_F() local 40 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
in HWTEST_F() 41 if (pid == 0) { // child
in HWTEST_F() 49 WaitProcExitedOK(pid);
in HWTEST_F() 59 pid_t pid = fork();
in HWTEST_F() local 60 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
in HWTEST_F() 61 if (pid == 0) { // child
in HWTEST_F() 71 WaitProcExitedOK(pid);
in HWTEST_F() 84 pid_t pid = fork();
in HWTEST_F() local 85 ASSERT_TRUE(pid > in HWTEST_F() 108 pid_t pid = fork(); HWTEST_F() local 133 pid_t pid = fork(); HWTEST_F() local [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...] |