473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

does aio_write() open the file or it expects it open?

hello everyone,
i am trying to do some file appending.
there is a loop that is running and whenever the condition is met, a
file needs to me opened and a buffer dumped into it.
now i have managed to make that work with fopen(FILE*, char*).

but aio_write needs a file descriptor to be fed into it through the
structure 'aiocb'.

searching through for how to get a file descriptor i found in the man
pages that open() returns exactly that.

my question is should i oen the file and then run aio_write(aiocb *)
or should i directly run aio_write() and it will do the opening and
closing of the file on its own?
thank you in advance for your help
nass

Feb 15 '07 #1
2 1674
On 15 Feb, 12:45, "nass" <athanasios.si...@gmail.comwrote:
hello everyone,
i am trying to do some file appending.
<snip question about aio library>

Are you sure you're asking in the right place? There is no aio_write
and aiocb in standard C++. If they are standard C library beasts (my
brief googling suggests not, but I could be wrong, then comp.lang.c
will be able to help. Otherwise, you'll need to ask a forum dedicated
to the library, or perhaps a forum dedicated to your compiler if aio
is a standard extension with that coimpiler.

Gavin Deane

Feb 15 '07 #2
nass wrote:
hello everyone,
i am trying to do some file appending.
there is a loop that is running and whenever the condition is met, a
file needs to me opened and a buffer dumped into it.
now i have managed to make that work with fopen(FILE*, char*).

but aio_write needs a file descriptor to be fed into it through the
structure 'aiocb'.

searching through for how to get a file descriptor i found in the man
pages that open() returns exactly that.

my question is should i oen the file and then run aio_write(aiocb *)
or should i directly run aio_write() and it will do the opening and
closing of the file on its own?
thank you in advance for your help
nass
aio is a Posix std lib found on many unix & linux systems.
Try asking in the Newsgroup comp.os.linux.development.system

Feb 15 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: MC | last post by:
Hi If I have a pointer to a some structure say for example payroll_ptr where struct payroll { ... } has some members and if i use a function argument as int function_process ( (payroll_ptr)...
4
by: nass | last post by:
hello everyone i am looking into asynchronous file writing (appending). what the program is doing: i am running a loop and when the condition is met (basically a timer) a buffer gets appended to...
19
by: Angus | last post by:
I have a socket class CTestClientSocket which I am using to simulate load testing. I create multiple instances of the client like this: for (int i = 0; i < 5; i++) { CTestClientSocket* pTemp...
24
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the...
3
by: siyaverma | last post by:
i am trying to upload csv file from user's computer to main server the code i am using is if(((isset($_GET)) && ($_GET=="yes")) ) { $typefield = $_GET; echo...
2
by: parag_paul | last post by:
I was looking into the following page http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html Here there is a term open-coded , why to ? And I saw the following definition for long long 5.8...
2
by: Bart Kastermans | last post by:
I have written a little program that takes as input a text file, converts it to a list with appropriate html coding (making it into a nice table). Finally I want to upload this list as a textfile...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
8
by: Ron | last post by:
I am building a dynamic image loading class. I have a list of properties that have associated images in a specified directory. The problem they are multiple formats which are not known at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.