ruby-changes:31459
From: nobu <ko1@a...>
Date: Tue, 5 Nov 2013 17:10:43 +0900 (JST)
Subject: [ruby-changes:31459] nobu:r43538 (trunk): pty.c: check error of seteuid
nobu 2013-11-05 17:10:34 +0900 (Tue, 05 Nov 2013) New Revision: 43538 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43538 Log: pty.c: check error of seteuid * ext/pty/pty.c (chfunc): check error of seteuid and return error message, to suppress unused-value warning. Modified files: trunk/ext/pty/pty.c Index: ext/pty/pty.c =================================================================== --- ext/pty/pty.c (revision 43537) +++ ext/pty/pty.c (revision 43538) @@ -144,7 +144,7 @@ chfunc(void *data, char *errbuf, size_t https://github.com/ruby/ruby/blob/trunk/ext/pty/pty.c#L144 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)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/