[webkit-reviews] review granted: [Bug 27923] run-webkit-tests should not invoke "ps" repeatedly on Mac OS X : [Attachment 33939] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Aug 1 13:01:05 PDT 2009
Sam Weinig <sam at webkit.org> has granted Mark Rowe (bdash) <mrowe at apple.com>'s
request for review:
Bug 27923: run-webkit-tests should not invoke "ps" repeatedly on Mac OS X
https://bugs.webkit.org/show_bug.cgi?id=27923
Attachment 33939: Patch
https://bugs.webkit.org/attachment.cgi?id=33939&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
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.
More information about the webkit-reviews
mailing list