|
|
1.1 ! root 1: ! 2: ! 3: creat() COHERENT System Call creat() ! 4: ! 5: ! 6: ! 7: ! 8: Create/truncate a file ! 9: ! 10: iinntt ccrreeaatt(_f_i_l_e, _m_o_d_e) cchhaarr *_f_i_l_e; iinntt _m_o_d_e; ! 11: ! 12: creat creates a new file or truncates an existing file. It ! 13: returns a file descriptor that identifies file for subsequent ! 14: system calls. If file already exists, its contents are erased. ! 15: In this case, creat ignores the specified _m_o_d_e; the mode of the ! 16: file remains unchanged. If file did not exist previously, creat ! 17: uses the mode argument to determine the mode of the new file. ! 18: For a full definition of file modes, see chmod or the header file ! 19: stat.h. creat masks the mode argument with the current umask, so ! 20: it is common practice to create files with the maximal mode ! 21: desirable. ! 22: ! 23: ***** Example ***** ! 24: ! 25: For an example of how to use this routine, see the entry for ! 26: open. ! 27: ! 28: ***** See Also ***** ! 29: ! 30: chmod(), COHERENT system calls(), fopen(), open(), stat.h, STDIO ! 31: ! 32: ***** Diagnostics ***** ! 33: ! 34: If the call is successful, creat returns a file descriptor. It ! 35: returns -1 if it could not create the file, typically because of ! 36: insufficient system resources or protection violations. ! 37: ! 38: ! 39: ! 40: ! 41: ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.