/third_party/musl/libc-test/src/functional/ |
H A D | atexit_dlclose.c | 84 pid_t pid, w; in main() local 88 pid = fork(); in main() 89 if (pid == 0) { // child process in main() 91 } else if (pid > 0) { // parent process in main() 92 w = waitpid(pid, &wstatus, 0); in main()
|
/third_party/pulseaudio/src/modules/gsettings/ |
H A D | module-gsettings.c | 47 u->pid = (pid_t) -1; in pa__init() 61 PA_GSETTINGS_HELPER, NULL, &u->pid)) < 0) in pa__init() 94 if (u->pid != (pid_t) -1) { in pa__done() 95 kill(u->pid, SIGTERM); in pa__done() 98 if (waitpid(u->pid, NULL, 0) >= 0) in pa__done()
|
/third_party/toybox/toys/other/ |
H A D | timeout.c | 35 pid_t pid; 43 fprintf(stderr, "timeout pid %d signal %d\n", TT.pid, TT.nextsig); in handler() 46 kill(TT.pid, TT.nextsig); in handler() 80 if (!(TT.pid = XVFORK())) xexec(toys.optargs+1); in timeout_main() 87 status = xwaitpid(TT.pid); in timeout_main()
|
/kernel/linux/linux-6.6/kernel/ |
H A D | exit.c | 249 struct pid *thread_pid; in release_task() 333 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp() 363 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs() 383 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp() 626 * 3. give it to the init process (PID 1) in our pid namespace 644 * We check pid->level, this is slightly more efficient than in find_new_reaper() 957 if (unlikely(!tsk->pid)) in make_task_dead() 1053 pid_t pid; member 1062 struct pid *wo_pid; 1114 pid_t pid in wait_task_zombie() local 1277 pid_t pid; wait_task_stopped() local 1346 pid_t pid; wait_task_continued() local 1662 struct pid *pid = NULL; kernel_waitid() local 1761 struct pid *pid = NULL; kernel_wait4() local 1800 kernel_wait(pid_t pid, int *stat) kernel_wait() argument 1910 thread_group_exited(struct pid *pid) thread_group_exited() argument [all...] |
/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/include/appmgr/ |
H A D | app_mgr_proxy.h | 192 * @param pid, the pid of current app running record. 196 virtual int32_t JudgeSandboxByPid(pid_t pid, bool &isSandbox) override; 229 * @param procLevelMap ,<pid, level> map; 238 * @param pid, pid input. 242 virtual int32_t DumpHeapMemory(const int32_t pid, OHOS::AppExecFwk::MallocInfo &mallocInfo) override; 248 * @param info, pid tid needGc needSnapshot 338 * @param pid The process id. 342 virtual int GetAbilityRecordsByProcessID(const int pid, st [all...] |
/foundation/multimedia/drm_framework/services/drm_service/server/src/ |
H A D | mediakeysystemfactory_service.cpp | 112 int pid = getpid();
in OnStop() local 114 Memory::MemMgrClient::GetInstance().NotifyProcessStatus(pid, 1, 0, 3012);
in OnStop() 123 int32_t pid = getpid();
in OnAddSystemAbility() local 125 Memory::MemMgrClient::GetInstance().NotifyProcessStatus(pid, 1, 1, 3012);
in OnAddSystemAbility() 140 void MediaKeySystemFactoryService::DistroyForClientDied(pid_t pid)
in DistroyForClientDied() argument 142 // destroy all system objects for this pid
in DistroyForClientDied() 143 DRM_INFO_LOG("DistroyForClientDied pid: %{public}d.", pid);
in DistroyForClientDied() 145 if (mediaKeySystemForPid_.find(pid) == mediaKeySystemForPid_.end()) {
in DistroyForClientDied() 148 for (auto it = mediaKeySystemForPid_[pid] in DistroyForClientDied() 195 int32_t pid = IPCSkeleton::GetCallingPid(); CreateMediaKeySystem() local [all...] |
/foundation/resourceschedule/memmgr/interface/innerkits/src/ |
H A D | mem_mgr_proxy.cpp | 62 int32_t MemMgrProxy::NotifyDistDevStatus(int32_t pid, int32_t uid, const std::string &name, bool connected) in NotifyDistDevStatus() argument 64 HILOGI("called, pid=%{public}d, uid=%{public}d, name=%{public}s, connected=%{public}d", pid, uid, name.c_str(), in NotifyDistDevStatus() 76 if (!data.WriteInt32(pid) || !data.WriteInt32(uid) || !data.WriteString(name) || !data.WriteBool(connected)) { in NotifyDistDevStatus() 129 int32_t MemMgrProxy::RegisterActiveApps(int32_t pid, int32_t uid) in RegisterActiveApps() argument 131 HILOGI("called, pid=%{public}d, uid=%{public}d", pid, uid); in RegisterActiveApps() 142 if (!data.WriteInt32(pid) || !data.WriteInt32(uid)) { in RegisterActiveApps() 162 int32_t MemMgrProxy::DeregisterActiveApps(int32_t pid, int32_t uid) in DeregisterActiveApps() argument 164 HILOGI("called, pid in DeregisterActiveApps() 365 GetReclaimPriorityByPid(int32_t pid, int32_t &priority) GetReclaimPriorityByPid() argument 466 NotifyProcessStatus(int32_t pid, int32_t type, int32_t status, int32_t saId) NotifyProcessStatus() argument 505 SetCritical(int32_t pid, bool critical, int32_t saId) SetCritical() argument [all...] |
H A D | app_state_subscriber.cpp | 45 void AppStateSubscriber::OnAppStateChanged(int32_t pid, int32_t uid, int32_t state) {}
in OnAppStateChanged() argument 49 void AppStateSubscriber::ForceReclaim(int32_t pid, int32_t uid) {}
in ForceReclaim() argument 93 void AppStateSubscriber::AppStateSubscriberImpl::OnAppStateChanged(int32_t pid, int32_t uid, int32_t state)
in OnAppStateChanged() argument 101 subscriber_.OnAppStateChanged(pid, uid, state);
in OnAppStateChanged() 104 void AppStateSubscriber::AppStateSubscriberImpl::ForceReclaim(int32_t pid, int32_t uid)
in ForceReclaim() argument 112 subscriber_.ForceReclaim(pid, uid);
in ForceReclaim()
|
/foundation/communication/ipc/ipc/native/src/core/source/ |
H A D | dbinder_callback_stub.cpp | 87 int pid = IPCSkeleton::GetCallingPid(); in ProcessProto() local 88 if (uid < 0 || pid < 0) { in ProcessProto() 89 ZLOGE(LOG_LABEL, "uid or pid err"); in ProcessProto() 100 std::string sessionName = samgr->GetSessionNameForPidUid(uid, pid); in ProcessProto() 106 return ProcessData(uid, pid, sessionName, data, reply); in ProcessProto() 109 int32_t DBinderCallbackStub::ProcessData(int uid, int pid, const std::string &sessionName, MessageParcel &data, in ProcessData() argument 115 if (!authData.WriteUint32(pid) || !authData.WriteUint32(uid) || !authData.WriteString(localDeviceID_) || in ProcessData() 134 "localDeviceID:%{public}s serviceName:%{public}s uid:%{public}d pid:%{public}d " in ProcessData() 137 IPCProcessSkeleton::ConvertToSecureString(localDeviceID_).c_str(), serviceName_.c_str(), uid, pid, tokenId_, in ProcessData() 207 int DBinderCallbackStub::AddDBinderCommAuth(pid_t pid, uid_ argument 272 GetAndSaveDBinderData(pid_t pid, uid_t uid) GetAndSaveDBinderData() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/proc/ |
H A D | proc-pid-vm.c | 70 static pid_t pid = -1; variable 73 if (pid > 0) { in ate() 74 kill(pid, SIGTERM); in ate() 228 pid_t pid; in vsyscall() local 231 pid = fork(); in vsyscall() 232 if (pid < 0) { in vsyscall() 236 if (pid == 0) { in vsyscall() 250 waitpid(pid, &wstatus, 0); in vsyscall() 282 pid = fork(); in main() 283 if (pid in main() [all...] |
/kernel/linux/linux-5.10/tools/perf/bench/ |
H A D | inject-buildid.c | 39 int pid; member 166 event.fork.pid = data->pid; in synthesize_fork() 167 event.fork.tid = data->pid; in synthesize_fork() 187 event.mmap2.pid = data->pid; in synthesize_mmap() 188 event.mmap2.tid = data->pid; in synthesize_mmap() 222 .tid = data->pid, in synthesize_sample() 223 .pid = data->pid, in synthesize_sample() [all...] |
/kernel/linux/linux-5.10/net/core/ |
H A D | scm.c | 25 #include <linux/pid.h> 55 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds() 180 p->creds.pid = creds.pid; in __scm_send() 181 if (!p->pid || pid_vnr(p->pid) != creds.pid) { in __scm_send() 182 struct pid *pid; in __scm_send() local 184 pid in __scm_send() [all...] |
/kernel/linux/linux-5.10/drivers/media/test-drivers/vidtv/ |
H A D | vidtv_mux.c | 34 *vidtv_mux_get_pid_ctx(struct vidtv_mux *m, u16 pid) in vidtv_mux_get_pid_ctx() argument 38 hash_for_each_possible(m->pid_ctx, ctx, h, pid) in vidtv_mux_get_pid_ctx() 39 if (ctx->pid == pid) in vidtv_mux_get_pid_ctx() 45 *vidtv_mux_create_pid_ctx_once(struct vidtv_mux *m, u16 pid) in vidtv_mux_create_pid_ctx_once() argument 49 ctx = vidtv_mux_get_pid_ctx(m, pid); in vidtv_mux_create_pid_ctx_once() 57 ctx->pid = pid; in vidtv_mux_create_pid_ctx_once() 59 hash_add(m->pid_ctx, &ctx->h, pid); in vidtv_mux_create_pid_ctx_once() 79 u16 pid; in vidtv_mux_pid_ctx_init() local [all...] |
/kernel/linux/linux-6.6/drivers/media/test-drivers/vidtv/ |
H A D | vidtv_mux.c | 34 *vidtv_mux_get_pid_ctx(struct vidtv_mux *m, u16 pid) in vidtv_mux_get_pid_ctx() argument 38 hash_for_each_possible(m->pid_ctx, ctx, h, pid) in vidtv_mux_get_pid_ctx() 39 if (ctx->pid == pid) in vidtv_mux_get_pid_ctx() 45 *vidtv_mux_create_pid_ctx_once(struct vidtv_mux *m, u16 pid) in vidtv_mux_create_pid_ctx_once() argument 49 ctx = vidtv_mux_get_pid_ctx(m, pid); in vidtv_mux_create_pid_ctx_once() 57 ctx->pid = pid; in vidtv_mux_create_pid_ctx_once() 59 hash_add(m->pid_ctx, &ctx->h, pid); in vidtv_mux_create_pid_ctx_once() 79 u16 pid; in vidtv_mux_pid_ctx_init() local [all...] |
/kernel/linux/linux-6.6/tools/perf/bench/ |
H A D | inject-buildid.c | 40 int pid; member 167 event.fork.pid = data->pid; in synthesize_fork() 168 event.fork.tid = data->pid; in synthesize_fork() 188 event.mmap2.pid = data->pid; in synthesize_mmap() 189 event.mmap2.tid = data->pid; in synthesize_mmap() 223 .tid = data->pid, in synthesize_sample() 224 .pid = data->pid, in synthesize_sample() [all...] |
/kernel/linux/linux-6.6/tools/thermal/thermometer/ |
H A D | thermometer.c | 421 static int thermometer_execute(int argc, char *argv[], char *const envp[], pid_t *pid) in thermometer_execute() argument 426 *pid = fork(); in thermometer_execute() 427 if (*pid < 0) { in thermometer_execute() 432 if (!(*pid)) { in thermometer_execute() 442 pid_t pid = *(pid_t *)arg; in kill_process() local 444 if (kill(pid, SIGTERM)) in kill_process() 445 ERROR("Failed to send SIGTERM signal to '%d': %p\n", pid); in kill_process() 446 else if (waitpid(pid, NULL, 0)) in kill_process() 447 ERROR("Failed to wait pid '%d': %p\n", pid); in kill_process() 460 thermometer_wait(struct options *options, pid_t pid) thermometer_wait() argument 542 pid_t pid = -1; main() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/proc/ |
H A D | proc-pid-vm.c | 72 static pid_t pid = -1; variable 75 if (pid > 0) { in ate() 76 kill(pid, SIGTERM); in ate() 239 pid_t pid; in vsyscall() local 242 pid = fork(); in vsyscall() 243 if (pid < 0) { in vsyscall() 247 if (pid == 0) { in vsyscall() 274 waitpid(pid, &wstatus, 0); in vsyscall() 322 pid = fork(); in main() 323 if (pid in main() [all...] |
/kernel/linux/linux-6.6/net/core/ |
H A D | scm.c | 25 #include <linux/pid.h> 55 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds() 181 p->creds.pid = creds.pid; in __scm_send() 182 if (!p->pid || pid_vnr(p->pid) != creds.pid) { in __scm_send() 183 struct pid *pid; in __scm_send() local 185 pid in __scm_send() [all...] |
/test/xts/hats/kernel/madvise/ |
H A D | MadviseApiTest.cpp | 264 pid_t pid = fork(); in HWTEST_F() local 265 ASSERT_TRUE(pid >= 0); in HWTEST_F() 266 if (pid == 0) in HWTEST_F() 311 pid_t pid = fork(); in HWTEST_F() local 312 ASSERT_TRUE(pid >= 0); in HWTEST_F() 313 if (pid == 0) in HWTEST_F() 344 pid_t pid = fork(); in HWTEST_F() local 345 ASSERT_TRUE(pid >= 0); in HWTEST_F() 346 if (pid == 0) in HWTEST_F() 384 pid_t pid in HWTEST_F() local 428 pid_t pid = fork(); HWTEST_F() local [all...] |
/third_party/ltp/testcases/kernel/syscalls/kill/ |
H A D | kill10.c | 179 /* pid checklist management */ 181 pid_t pid; member 251 mypid, -child_checklist[cnt].pid); in main() 252 kill(-child_checklist[cnt].pid, SIGUSR1); in main() 345 printf("%d ", child_checklist[i].pid); in setup() 369 findit.pid = si->si_pid; in ack_ready() 396 findit.pid = si->si_pid; in ack_done() 429 kill(-child_checklist[i].pid, SIGQUIT); in cleanup() 430 waitpid(child_checklist[i].pid, NULL, 0); in cleanup() 464 child_checklist[child_checklist_total++].pid in fork_pgrps() [all...] |
/foundation/ability/ability_runtime/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/ |
H A D | abilitymgrappexitreasonhelper_fuzzer.cpp | 80 int32_t pid = static_cast<int32_t>(GetU32Data(data)); in DoSomethingInterestingWithMyAPI() local 81 infos->RecordProcessExtensionExitReason(pid, jsonStr, exitReason); in DoSomethingInterestingWithMyAPI() 82 infos->RecordProcessExitReason(pid, exitReason); in DoSomethingInterestingWithMyAPI() 84 infos->RecordProcessExitReason(pid, jsonStr, uid, accessTokenId, exitReason); in DoSomethingInterestingWithMyAPI() 86 infos->GetActiveAbilityList(uid, abilityLists, pid); in DoSomethingInterestingWithMyAPI() 87 infos->GetActiveAbilityListFromUIAbilityManager(uid, abilityLists, pid); in DoSomethingInterestingWithMyAPI()
|
/foundation/CastEngine/castengine_cast_framework/service/include/ |
H A D | cast_session_manager_service.h | 56 void ReleaseServiceResources(pid_t pid); 69 CastEngineClientDeathRecipient(wptr<CastSessionManagerService> service, pid_t pid) in CastEngineClientDeathRecipient() argument 70 : service_(service), pid_(pid) {}; in CastEngineClientDeathRecipient() 89 void AddClientDeathRecipientLocked(pid_t pid, sptr<ICastServiceListenerImpl> listener); 90 void RemoveClientDeathRecipientLocked(pid_t pid, sptr<ICastServiceListenerImpl> listener); 93 int32_t RemoveListenerLocked(pid_t pid);
|
/foundation/multimedia/av_session/services/session/adapter/ |
H A D | app_manager_adapter.cpp | 66 bool AppManagerAdapter::IsAppBackground(int32_t uid, int32_t pid) in IsAppBackground() argument 74 if (info.uid_ == uid && info.pid_ == pid && info.state_ == AppProcessState::APP_STATE_BACKGROUND) { in IsAppBackground() 75 SLOGI("uid=%{public}d pid=%{public}d is background", uid, pid); in IsAppBackground() 79 SLOGD("uid=%{public}d pid=%{public}d is not background", uid, pid); in IsAppBackground() 132 SLOGI("bundleName=%{public}s uid=%{public}d pid=%{public}d state=%{public}d", in HandleAppStateChanged() 133 appData.appName.c_str(), appData.uid, appProcessData.pid, appProcessData.appState); in HandleAppStateChanged() 138 appNeedHandleMap.insert(std::make_pair(appData.uid, appProcessData.pid)); in HandleAppStateChanged()
|
/foundation/multimedia/av_session/services/session/server/ |
H A D | avsession_users_manager.h | 46 int32_t AddSessionForCurrentUser(pid_t pid, const std::string& abilityName, sptr<AVSessionItem>& item); 48 sptr<AVSessionItem> RemoveSessionForAllUser(pid_t pid, const std::string& abilityName); 52 std::vector<sptr<AVSessionItem>> RemoveSessionForAllUser(pid_t pid); 54 void AddSessionListener(pid_t pid, const sptr<ISessionListener>& listener); 56 void AddSessionListenerForAllUsers(pid_t pid, const sptr<ISessionListener>& listener); 58 void RemoveSessionListener(pid_t pid);
|
/foundation/resourceschedule/memmgr/services/memmgrservice/include/ |
H A D | mem_mgr_service.h | 33 virtual int32_t NotifyDistDevStatus(int32_t pid, int32_t uid, const std::string &name, bool connected) override; 36 virtual int32_t RegisterActiveApps(int32_t pid, int32_t uid) override; 37 virtual int32_t DeregisterActiveApps(int32_t pid, int32_t uid) override; 44 virtual int32_t GetReclaimPriorityByPid(int32_t pid, int32_t &priority) override; 47 virtual int32_t NotifyProcessStatus(int32_t pid, int32_t type, int32_t status, int32_t saId = -1) override; 48 virtual int32_t SetCritical(int32_t pid, bool critical, int32_t saId = -1) override;
|