Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>dup</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dup
===

Syntax
------

     #include <unistd.h>
     
     int dup(int old_handle);

Description
-----------

This function duplicates the given file handle.  Both handles refer to
the same file and file pointer.

Return Value
------------

The new file handle, or -1 if error.

Example
-------

     do_file(dup(fileno(stdin)));


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson