[vte] Preserve errno for the _vte_pty_* compat API
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Preserve errno for the _vte_pty_* compat API
- Date: Wed, 24 Mar 2010 14:47:48 +0000 (UTC)
commit da94ec83debfbf19e36fec9aea15f619803cee70
Author: Christian Persch <chpe gnome org>
Date: Wed Mar 24 15:21:49 2010 +0100
Preserve errno for the _vte_pty_* compat API
src/pty.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/pty.c b/src/pty.c
index 83a6ec6..0a94ec0 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -906,9 +906,11 @@ _vte_pty_open_unix98(VtePty *pty,
if ((buf = _vte_pty_ptsname(fd, error)) == NULL ||
!_vte_pty_grantpt(fd, error) ||
!_vte_pty_unlockpt(fd, error)) {
+ int errsv = errno;
_vte_debug_print(VTE_DEBUG_PTY,
"PTY setup failed, bailing.\n");
close(fd);
+ errno = errsv;
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]