Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
dup2.c File Reference
`#include "ruby/config.h"`
`#include <errno.h>`

Go to the source code of this file.

## Macros
#define | BADEXIT -1

## Functions
int | dup2 (int fd1, int fd2)

## Macro Definition Documentation

## ◆ BADEXIT

#define BADEXIT -1

Definition at line 24 of file dup2.c.

## Function Documentation

## ◆ dup2()

int dup2 | ( | int | fd1,
|  | int | fd2
| ) |  |

Definition at line 27 of file dup2.c.

References BADEXIT, close(), dup(), EMFILE, errno, F_DUPFD, fcntl(), and i.

Referenced by goruby_options(), rb_cloexec_dup2(), and rb_w32_dup2().