|
|
coherent
creat() COHERENT System Call creat() Create/truncate a file iinntt ccrreeaatt(_f_i_l_e, _m_o_d_e) cchhaarr *_f_i_l_e; iinntt _m_o_d_e; creat creates a new file or truncates an existing file. It returns a file descriptor that identifies file for subsequent system calls. If file already exists, its contents are erased. In this case, creat ignores the specified _m_o_d_e; the mode of the file remains unchanged. If file did not exist previously, creat uses the mode argument to determine the mode of the new file. For a full definition of file modes, see chmod or the header file stat.h. creat masks the mode argument with the current umask, so it is common practice to create files with the maximal mode desirable. ***** Example ***** For an example of how to use this routine, see the entry for open. ***** See Also ***** chmod(), COHERENT system calls(), fopen(), open(), stat.h, STDIO ***** Diagnostics ***** If the call is successful, creat returns a file descriptor. It returns -1 if it could not create the file, typically because of insufficient system resources or protection violations. COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.