This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/umask.c

14 lines
270 B
C
Raw Permalink Normal View History

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <io.h>
void main()
{
int old_mask;
/* set mask to create read-only files */
old_mask = umask( S_IWUSR | S_IWGRP | S_IWOTH |
S_IXUSR | S_IXGRP | S_IXOTH );
}