| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- file space control
#include <fcntl.h>intposix_fallocate(intfd,off_toffset,off_tlen);
Theposix_fallocate() function ensures that any required storage for regular file datastarting atoffset and continuing forlen bytes is allocated on thefile system storage media. Ifposix_fallocate() returns successfully, subsequent writes to the specifiedfile data will not fail due to the lack of free spaceon the file system storage media.
If theoffset+len is beyond the current file size, thenposix_fallocate() adjuststhe file size tooffset+len. Otherwise, the file size is not changed.
Space allocated withposix_fallocate() is freed by a successful call tocreat(2)oropen(2) that truncates the size of the file. Space allocated withposix_fallocate() may be freed by a successful call toftruncate(3C) that reducesthe file size to a size smaller thanoffset+len.
Upon successful completion,posix_fallocate() returns zero. Otherwise, an error number is returnedto indicate the error.
Theposix_fallocate() function will fail if:
Thefd argument is not a valid file descriptor or references a file that was opened without write permission.
The value ofoffset+len is greater than the maximum file size.
A signal was caught during execution.
Thelen argument is less than or equal to zero, or theoffset argument is less than zero, or the underlying file system does not support this operation. See NOTES.
An I/O error occurred while reading from or writing to a file system.
Thefd argument does not refer to a regular file.
There is insufficient free space remaining on the file system storage media.
Thefd argument is associated with a pipe or FIFO.
Theposix_fallocate() function has a transitional interface for 64-bit file offsets. Seelf64(5).
Seeattributes(5) for descriptions of the following attributes:
|
creat(2),open(2),unlink(2),ftruncate(3C),attributes(5),standards(5)
Theposix_fallocate() function is supported only for regular files residing on UFSfilesystems. Attempts to use it with files on any other filesystem typeresults in anEINVAL error.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |