freopen man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

FREOPEN(3)			    NEWLIB			    FREOPEN(3)

NAME
       4.25 `freopen'--open a file using an existing file descriptor

SYNOPSIS
	    #include <stdio.h>
	    FILE *freopen(const char *FILE, const char *MODE,
		FILE *FP);
	    FILE *_freopen_r(struct _reent *PTR, const char *FILE,
		const char *MODE, FILE *FP);

DESCRIPTION
       Use  this  variant  of `fopen' if you wish to specify a particular file
       descriptor FP (notably `stdin', `stdout', or `stderr') for the file.

	  If FP was associated with another file or stream,  `freopen'	closes
       that other file or stream (but ignores any errors while closing it).

	  FILE and MODE are used just as in `fopen'.

	  If  FILE  is	`NULL',	 the underlying stream is modified rather than
       closed.	The file cannot be given a more permissive  access  mode  (for
       example,	 a  MODE of "w" will fail on a read-only file descriptor), but
       can change status such as append or binary mode.	  If  modification  is
       not possible, failure occurs.

RETURNS
       If  successful, the result is the same as the argument FP.  If the file
       cannot be opened as specified, the result is `NULL'.

PORTABILITY
       ANSI C requires `freopen'.

	  Supporting OS	 subroutines  required:	 `close',  `fstat',  `isatty',
       `lseek', `open', `read', `sbrk', `write'.

SEE ALSO
       freopen	is  part  of the library.  The full documentation for is main‐
       tained as a Texinfo manual.  If info and are properly installed at your
       site, the command

	      info

       will give you access to the complete manual.

NEWLIB				  April 2010			    FREOPEN(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net