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

N

nass

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
 
G

Gavin Deane

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
 
L

Larry Smith

nass said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top