Sponsored Content
Top Forums Programming write() issue during a low level hdd access Post 302397277 by Corona688 on Sunday 21st of February 2010 05:32:42 PM
Old 02-21-2010
Hmm. Try fsync(fd) after the write. If it returns anything other than zero an error happened while syncing the data to disk.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Low level format?

I want to do a low level format like in windows (C:\format c:) but I don't know how it works in unix or linux.. Can somebody help me ? thnx :) (3 Replies)
Discussion started by: day
3 Replies

2. HP-UX

Access to a second HDD

Hello How to access to a second hard disk on a HP-UX system? Thanks (3 Replies)
Discussion started by: ouniss
3 Replies

3. IP Networking

Best reference for understanding low level info on nic cards drivers and functionality

Hi, What is the best reference that gives in detail on nic cards configuration , assigning multiple ip addresses to a single interface, netlink library etc and all basic stuff at this level..? Thanks (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies

4. AIX

High Runqueue (R) LOW CPU LOW I/O Low Network Low memory usage

Hello All I have a system running AIX 61 shared uncapped partition (with 11 physical processors, 24 Virtual 72GB of Memory) . The output from NMON, vmstat show a high run queue (60+) for continous periods of time intervals, but NO paging, relatively low I/o (6000) , CPU % is 40, Low network.... (9 Replies)
Discussion started by: IL-Malti
9 Replies

5. Programming

System calls and C language low-level qualities???

Hi friends, I hope everyone is fine and doing well. I queried in my previous thread about the low-level qualities of C/C++ languages.I really thank you people for explaining, it was really helpful. One more ambiquity that I have in my mind is regarding the unix system calls like open, creat,... (1 Reply)
Discussion started by: gabam
1 Replies

6. Programming

Why is C/C++ considered low-level languages???

Hi friends, I hope everyone is doing well and fine. I have always been hearing that C/C++ are relatively low-level as compared to Java/C# etc. Could you please tell me some low-level qualities of C/C++? And I think disk deframenters are written in C/C++, please correct me if I am wrong. And please... (5 Replies)
Discussion started by: gabam
5 Replies

7. Programming

Low level X11 programming

How to use X11 without Xlib not XCB? How draw window directly on low level? I must use anyway window manager like Motif? I have ridden that X11 has server-client architecture, client send via TCP/IP to port 6000 request for primitives and get replies. Where is detailed description of it? In X11... (0 Replies)
Discussion started by: AndrzejB
0 Replies
fsync(2)							System Calls Manual							  fsync(2)

Name
       fsync - synchronize a file's in-core state with that on disk

Syntax
       fsync(fd)
       int fd;

Description
       The system call causes all modified data and attributes of fd to be moved to a permanent storage device.  This results in all in-core modi-
       fied copies of buffers for the associated file to be written to a disk.

       The call should be used by programs that require a file to be in a known state, for example, in building a simple transaction facility.

Return Values
       A 0 value is returned on success.  A -1 value indicates an error.

Diagnostics
       The call fails under the following conditions:

       [EBADF]	      The fd argument is not a valid descriptor.

       [EINVAL]       The fd argument refers to a socket.

       [EIO]	      An I/O error occurred while reading from or writing to the file system.

       [EINTR]	      The function was interrupted by a signal.

       If an error occurs on an asynchronous write over NFS, the error cannot always be returned from a system call.  The error code  is  returned
       on or The following are NFS-only error messages:

       [EACCESS]      The requested address is protected, and the current user has inadequate permission to access it.

       [ENOSPC]       There is no free space remaining on the file system containing the file.

       [EDQUOT]       The user's quota of disk blocks on the file system containing the file has been exhausted.

       [EROFS]	      The file is on a read-only file system.

       [ESTALE]       The fd argument is invalid because the file referred to by that file handle no longer exists or has been revoked.

       [ETIMEDOUT]    A  write	operation  failed  because  the  server  did  not properly respond after a period of time that is dependent on the
		      options.

See Also
       sync(1), close(2), sync(2), write(2), update(8)

																	  fsync(2)
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy