comparison agent/src/os/bsd/ps_proc.c @ 13002:1a04de1aaedb

8026950: Nits in agent ps_proc.c file breaks compilation of open hotspot Summary: Fixed two compilation-breaking nits Reviewed-by: sla, dholmes
author dsamersoff
date Mon, 28 Oct 2013 21:41:48 +0400
parents 2394a89e89f4
children
comparison
equal deleted inserted replaced
13001:b4aa8fc5d0d5 13002:1a04de1aaedb
129 return (errno == 0)? true: false; 129 return (errno == 0)? true: false;
130 } 130 }
131 131
132 static bool ptrace_continue(pid_t pid, int signal) { 132 static bool ptrace_continue(pid_t pid, int signal) {
133 // pass the signal to the process so we don't swallow it 133 // pass the signal to the process so we don't swallow it
134 if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) { 134 if (ptrace(PT_CONTINUE, pid, NULL, signal) < 0) {
135 print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid); 135 print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid);
136 return false; 136 return false;
137 } 137 }
138 return true; 138 return true;
139 } 139 }
432 }; 432 };
433 433
434 // attach to the process. One and only one exposed stuff 434 // attach to the process. One and only one exposed stuff
435 struct ps_prochandle* Pgrab(pid_t pid) { 435 struct ps_prochandle* Pgrab(pid_t pid) {
436 struct ps_prochandle* ph = NULL; 436 struct ps_prochandle* ph = NULL;
437 thread_info* thr = NULL;
438 437
439 if ( (ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle))) == NULL) { 438 if ( (ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle))) == NULL) {
440 print_debug("can't allocate memory for ps_prochandle\n"); 439 print_debug("can't allocate memory for ps_prochandle\n");
441 return NULL; 440 return NULL;
442 } 441 }