From 7f23534b1fdc374a94e0a1fe09911154c14ed9f8 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Nov 2013 08:10:34 +0000 Subject: pty.c: check error of seteuid * ext/pty/pty.c (chfunc): check error of seteuid and return error message, to suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pty') diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 20b2cc09cd..4ba1cba621 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -144,7 +144,7 @@ chfunc(void *data, char *errbuf, size_t errbuf_len) dup2(slave,2); close(slave); #if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID) - seteuid(getuid()); + if (seteuid(getuid())) ERROR_EXIT("seteuid()"); #endif return rb_exec_async_signal_safe(carg->eargp, errbuf, sizeof(errbuf_len)); -- cgit v1.2.3