Proc-Exists

 view release on metacpan or  search on metacpan

Exists.xs  view on Meta::CPAN

		int i;
		int exists;
		int pid;

		/* make sure pids_ref is a ref pointing at an array with some elements */
		if ((!SvROK(pids_ref)) || (SvTYPE(SvRV(pids_ref)) != SVt_PVAV) || 
			 ((npids = av_len((AV *)SvRV(pids_ref))) < 0)) {
			XSRETURN_UNDEF;
		}
		pids = (AV *)SvRV(pids_ref);
	PPCODE:
		for(i=0; i<=npids; i++) {
			pid_sv = *av_fetch(pids, i, 0);

			pid = get_pid(pid_sv);

			exists = __pexists(pid);

			/* hook 1 */
			if(exists) {
				mXPUSHi(pid);



( run in 2.136 seconds using v1.01-cache-2.11-cpan-5511b514fd6 )