Summary: | run-webkit-tests should not invoke "ps" repeatedly on Mac OS X | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Rowe (bdash) <mrowe> | ||||||
Component: | Tools / Tests | Assignee: | Mark Rowe (bdash) <mrowe> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap, darin, ddkilzer | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac (Intel) | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Mark Rowe (bdash)
2009-08-01 12:46:34 PDT
Created attachment 33939 [details]
Patch
Comment on attachment 33939 [details] Patch Looks good, one issue below. > +++ b/WebKitTools/DumpRenderTree/mac/PerlSupport/DumpRenderTreeSupport.c > @@ -0,0 +1,17 @@ > +#include <sys/sysctl.h> > + > +int processIsCrashing(int pid) > +{ > + int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid }; > + struct kinfo_proc info; > + size_t bufferSize = sizeof(info); > + if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &info, &bufferSize, 0, 0)) { > + perror("sysctl"); > + return 0; > + } > + > + struct extern_proc proc = info.kp_proc; > + > + // The process is crashing if it is waiting to exit, is not a zombie, and has a non-zero exit code. > + return proc.p_stat != SZOMB && (proc.p_flag & P_WEXIT) && proc.p_xstat; > +} This file needs a license. Otherwise, r=me. Bah, Tiger doesn't have swig. Rolled out in r46678. Will have to do some thinking to find an approach that works on Tiger too. Created attachment 33944 [details]
With support for Tiger
Comment on attachment 33944 [details]
With support for Tiger
r=me
(In reply to comment #7) > (From update of attachment 33944 [details]) > r=me WebKitTools/DumpRenderTree/mac/PerlSupport/Makefile needs a license, too. |