#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
+#include <glib/gstdio.h>
static gboolean
rename_file (const char *old_name,
* the umask in between the getting and the setting of the umask.
* So we have to do the whole thing in a child process.
*/
-
- int save_errno;
pid_t pid;
pid = fork ();
if (WIFEXITED (status))
{
- save_errno = WEXITSTATUS (status);
-
- if (save_errno == 0)
+ if (WEXITSTATUS (status) == 0)
{
return TRUE;
}
gchar *retval;
FILE *file;
gint fd;
- int save_errno;
retval = NULL;