www.delorie.com/djgpp/doc/libc/libc_104.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

close

Syntax

 
#include <unistd.h>

int close(int fd);

Description

The open file associated with fd is closed.

Return Value

Zero if the file was closed, nonzero if fd was invalid or already closed.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

 
int fd = open("data", O_RDONLY);
close(fd);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004