mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
b2f7e64caf
commit
7f23534b1f
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue