X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fphosphor.c;h=7be6c03cfb27ab8a4e714029c486010e767961ae;hp=3ce65d73ce8ea9ba203cc9589c83b33c9a79dc01;hb=f0261d8acab611f3433160e4f07367b870439739;hpb=7b34ef992563d7bcbb64cc5597dc45fa24470b05 diff --git a/hacks/phosphor.c b/hacks/phosphor.c index 3ce65d73..7be6c03c 100644 --- a/hacks/phosphor.c +++ b/hacks/phosphor.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999-2008 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999-2009 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -1354,6 +1354,7 @@ drain_input (p_state *state) { waitpid(state->pid, NULL, 0); fclose (state->pipe); + state->pid = 0; } else { @@ -1436,7 +1437,7 @@ phosphor_reshape (Display *dpy, Window window, void *closure, resize_grid (state); # if defined(HAVE_FORKPTY) && defined(TIOCSWINSZ) - if (state->pid) + if (state->pid && state->pipe) { /* Tell the sub-process that the screen size has changed. */ struct winsize ws;