Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fdatasync(2) [netbsd man page]

FDATASYNC(2)						      BSD System Calls Manual						      FDATASYNC(2)

NAME
fdatasync -- synchronize the data of a file LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int fdatasync(int fd); DESCRIPTION
The fdatasync() function forces all modified data associated with the file descriptor fd to be flushed to stable storage. The functionality is as described for fsync(2), with the exception that file status information need not be synchronized, which may result in a performance gain, compared to fsync(2). This behaviour is commonly known as synchronized I/O data integrity completion. RETURN VALUES
A value of 0 is returned on success. Otherwise, a value -1 is returned and errno is set to indicate the error. ERRORS
The fdatasync() function will fail if: [EBADF] The fd argument is not a valid file descriptor open for writing. [EINVAL] This implementation does not support synchronized I/O for this file. [ENOSYS] The fdatasync() function is not supported by this implementation. In the event that any of the I/O operations to be performed fail, fdatasync() returns the error conditions defined for read(2) and write(2), and outstanding I/O operations are not guaranteed to have been completed. SEE ALSO
fsync(2), open(2), read(2), write(2) STANDARDS
The fdatasync() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1''). BSD
October 25, 2003 BSD

Check Out this Related Man Page

fdatasync(3C)						   Standard C Library Functions 					     fdatasync(3C)

NAME
fdatasync - synchronize a file's data SYNOPSIS
#include <unistd.h> int fdatasync(int fildes); DESCRIPTION
The fdatasync() function forces all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state. The functionality is as described for fsync(3C) (with the symbol _XOPEN_REALTIME defined), with the exception that all I/O operations are completed as defined for synchronised I/O data integrity completion. RETURN VALUES
If successful, the fdatasync() function returns 0. Otherwise, the function returns -1 and sets errno to indicate the error. If the fdata- sync() function fails, outstanding I/O operations are not guaranteed to have been completed. ERRORS
The fdatasync() function will fail if: EBADF The fildes argument is not a valid file descriptor open for writing. EINVAL The system does not support synchronized I/O for this file. ENOSYS The function fdatasync() is not supported by the system. In the event that any of the queued I/O operations fail, fdatasync() returns the error conditions defined for read(2) and write(2). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ SEE ALSO
fcntl(2), open(2), read(2), write(2), fsync(3C), aio_fsync(3C), fcntl.h(3HEAD), attributes(5), standards(5) SunOS 5.11 5 Feb 2008 fdatasync(3C)
Man Page

8 More Discussions You Might Find Interesting

1. Programming

Fail tail algorithm

I am currently working on code that simulates a file tail algorithm since the only way to retrieve the required information is from within a file, and this information needs to be retrieved in as close to real time as possible when the event enters the file. I cannot use system("tail <options>")... (6 Replies)
Discussion started by: foureightyeast
6 Replies

2. Programming

serializing logging output mult. proc. inst deamon

Hello, i have an interresting topic today C++ on solaris. lgpl stuff applicable. My program is a deamon process wich takes input from network, then processes the data, and outputs reformatted to network. We're generating a lot of logging output. the logging is absolutely unbuffered at the... (3 Replies)
Discussion started by: heck
3 Replies

3. Solaris

Apache config issue

I want to build a little website on a Sun Blade 100 running Solaris 10. I just went out to apache.org and downloaded Unix Source: httpd-2.2.8.tar.gz After unpacking the tarball, I CD'd into the subdirectory and ran the configure utility. Of course, it crapped out. I see that it is... (17 Replies)
Discussion started by: BrewDudeBob
17 Replies

4. Filesystems, Disks and Memory

How To setup a Diskless Swap System.

This is a guide for setting up your computer with a fast swap system using usb memory sticks. A detailed study of the theories behind this setup can be found here. While this How-To does not include the CFLRU replacement algorithm, it does show the performance benefits of using NAND flash memory... (2 Replies)
Discussion started by: Johnny_Thumbs
2 Replies

5. Shell Programming and Scripting

problem using awk

Hi there every body I'm new to shell scripting and there is a problem facing me,, please look at the following piece of code: awk ' BEGIN{ FS="<assertion id=\1"; RS="<assertion id=\"2"}/<assertion id=\"1/{print FS$2 > "/home/ds2/test/output.txt"} ' filename all I wanna do is to... (6 Replies)
Discussion started by: senior_ahmed
6 Replies

6. Programming

Understanding read/write and kernel interaction

Ok, so I'm trying to finalize my understanding of read/write and kernel interaction. read(): You have a library function that has as it's first parameter (what the open file to read from is), second parameter( a pointer to a buffer (is this the location of a buffer in the user area or the... (7 Replies)
Discussion started by: Krothos
7 Replies

7. Filesystems, Disks and Memory

ext4 - ready for production system?

Gidday, Are you using ext4 for production system? Or is it better to opt for a more conservative strategy, like ext3 for instance? What are your experiences? Thanks in advance, Loïc. (3 Replies)
Discussion started by: Loic Domaigne
3 Replies

8. UNIX for Advanced & Expert Users

split command

./myapp | split -b 10m -d -a 1 - "myappLog" here split command is reading the input from the output of myapp and it will write the text in to file where in each file size is 10MB and it will create upto 10 files. I have observed split is flushing the data for every 4096 bytes. if my... (7 Replies)
Discussion started by: arv600
7 Replies