Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Windows: properly initialize errno before checking it

errno is never reset to 0 by the system libraries, so if we test
its value we need to reset it to 0 before the call that may change
it to something else.
  • Loading branch information...
commit 044120e87ce8ce021832868ae690d282f59d3b15 1 parent 0ebf6ab
@b4n b4n authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  src/win32.c
1  src/win32.c
@@ -1058,6 +1058,7 @@ gboolean win32_spawn(const gchar *dir, gchar **argv, gchar **env, GSpawnFlags fl
locale_command = g_strdup(command);
geany_debug("WIN32: actually running command:\n%s", command);
+ errno = 0;
ret = system(locale_command);
/* the command can return -1 as an exit code, so check errno also */
fail = ret == -1 && errno;

0 comments on commit 044120e

Please sign in to comment.
Something went wrong with that request. Please try again.