PERFORCE change 213465 for review
Brooks Davis
brooks at FreeBSD.org
Tue Jun 26 00:06:36 UTC 2012
http://p4web.freebsd.org/@@213465?ac=10
Change 213465 by brooks at brooks_ecr_current on 2012/06/26 00:06:07
Unbreak the case where we haven't worked a child process.
Affected files ...
.. //depot/projects/ctsrd/beribsd/src/ctsrd/spinner/spinner.c#3 edit
Differences ...
==== //depot/projects/ctsrd/beribsd/src/ctsrd/spinner/spinner.c#3 (text+ko) ====
@@ -80,7 +80,7 @@
main(int argc, char *argv[])
{
int alpha, ch, i, ofd;
- pid_t pid;
+ pid_t pid = 0;
char *ep;
char imgpath[MAXPATHLEN];
u_int32_t *bottom, *top;
@@ -164,7 +164,8 @@
for (i = 0; i < NSPINNERS; i++) {
- poll_child(pid);
+ if (pid != 0)
+ poll_child(pid);
snprintf(imgpath, sizeof(imgpath),
"%s/spinner%02d.png", IMGDIR, i);
read_png_file(imgpath, spinners[i], fb_width, fb_height);
@@ -191,7 +192,8 @@
if (i >= NSPINNERS)
i = 0;
fb_post(spinners[i]);
- poll_child(pid);
+ if (pid != 0)
+ poll_child(pid);
}
fb_fade2off();
More information about the p4-projects
mailing list