Preserve errno when using g_set_error with _() and g_strerror()

This commit is contained in:
Christian Persch
2008-05-27 23:44:35 +02:00
committed by Alexander Larsson
parent 80cfd099f3
commit 1cbdd2495d
2 changed files with 3 additions and 2 deletions

View File

@@ -1462,11 +1462,12 @@ make_pipe (gint p[2],
{
if (pipe (p) < 0)
{
gint errsv = errno;
g_set_error (error,
G_SPAWN_ERROR,
G_SPAWN_ERROR_FAILED,
_("Failed to create pipe for communicating with child process (%s)"),
g_strerror (errno));
g_strerror (errsv));
return FALSE;
}
else