Commit 5b3cf3bd authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

applied a patch from Raphael Quinet which adds a check for the return

2000-11-07  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/screenshot.c: applied a patch from Raphael
	Quinet which adds a check for the return value of waitpid().
parent c0bc1db6
2000-11-07 Sven Neumann <sven@gimp.org>
* plug-ins/common/screenshot.c: applied a patch from Raphael
Quinet which adds a check for the return value of waitpid().
2000-11-06 Daniel Egger <egger@suse.de>
 
* configure.in: Added new language hr (Croatian).
......
......@@ -240,6 +240,7 @@ shoot (void)
gchar *xwdargv[7]; /* need a maximum of 7 arguments to xwd */
gdouble xres, yres;
gint pid;
gint wret;
gint status;
gint i = 0;
......@@ -288,10 +289,14 @@ shoot (void)
}
#endif
{
waitpid (pid, &status, 0);
status = -1;
wret = waitpid (pid, &status, 0);
if (!WIFEXITED (status))
if ((wret < 0) || !WIFEXITED (status))
{
/* the tmpfile may have been created even if xwd failed */
unlink (tmpname);
g_free (tmpname);
g_message ("screenshot: xwd didn't work\n");
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment