04-21-2009
kindly elaborate about how character by charatcter read operation through library call will be faster than read system call ,done charatcer by character
This User Gave Thanks to vishwamitra For This Post:
10 More Discussions You Might Find Interesting
1. Programming
Hi
I was trying to open a file with french name on Mac OS-X with open() and fopen() but it didn't work.Do we have any POSIX unix func. which can be used to open any file with special name.
if anybody has an idea plz help.
Thanks
Mohit (1 Reply)
Discussion started by: mohit grover
1 Replies
2. Programming
hello..
i make some code with C in freebsd 5.4 and compile it in solaris
somehow i succeed compile the program.
but when i run it, i got error message "Broken Pipe"
i looked out the syntax that that caused this,
fp = fopen("file.tmp","r");
does anyone know why, and how to solve this... (3 Replies)
Discussion started by: kuampang
3 Replies
3. Programming
For reading in large text files (say files over 1kB in size) are there any issues with fopen() that I should be aware of ?
cheers (2 Replies)
Discussion started by: JamesGoh
2 Replies
4. Web Development
Dear all,
I'm a newbie for PHP and TCPDF ,I have to change the URL to PDF, so I used FPDF , But it cannot convert most of the advanced HTML tags. So explored again and found TCPDF , it can do most of the tag but I cannot found to change URL to PDF. So Does anyone can point the example... (0 Replies)
Discussion started by: athae
0 Replies
5. UNIX for Advanced & Expert Users
Hello!
I'm having problems with fopen() call in Linux.
I have shared library (created by myself) that implements some file operations:
int lib_func(char* file_name) {
...
fd = fopen(file_name, "r");
if(!fd) {... exit with error ...}
...
do something useful using fd
...
... (2 Replies)
Discussion started by: kalbi
2 Replies
6. Programming
This code works fine when I use a command line argument for fopen()'s parameter, but when I change it to a filename, the program freezes upon compilation. input.txt is definitely there, so I can't figure it out. Thanks.
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
int... (3 Replies)
Discussion started by: lazypeterson
3 Replies
7. Programming
I always assumed the fopen/freopen is very costly, so when I needed to work with many files within on process I spent extra time to implement a list of FILE * pointers to avoid extra open/reopen but it did not produced any better results.
Here is a task at hand - there is a huge stream of data... (4 Replies)
Discussion started by: migurus
4 Replies
8. Programming
Hi All,
Although this code is quite long but it does not require one to understand the logic of the code. I am trying to run this code on my Linux machine using gcc. But when this line is executed:
output_pointer = fopen ( file_name , "w" );I get segmentation fault. I've been breaking my head... (17 Replies)
Discussion started by: shoaibjameel123
17 Replies
9. Programming
Hello,
I have a problem here, I want to write a function called"myfopen()" instead of "fopen()"
for writing this function I must not use the <stdio.h> library,
Can you help me?
thanks a lot (2 Replies)
Discussion started by: hamed.samie
2 Replies
10. Shell Programming and Scripting
5Thank you to those who responded.
After a crazy amount of troubleshooting and getting hints and feedback from others, I was so darn determined to get on with my tutorials and I found the solution myself.
Keyword search: php and 'Mac computer' and fopen and chmod.
Using:php and Mac and... (1 Reply)
Discussion started by: iHaveAQuestion
1 Replies
LEARN ABOUT HPUX
aio_read
aio_read(2) System Calls Manual aio_read(2)
NAME
aio_read() - start an asynchronous read operation
SYNOPSIS
DESCRIPTION
The function allows the calling process to perform an asynchronous read from a previously opened file. The function call returns when the
read operation has been enqueued for processing. At this point, processing of the read operation may proceed concurrently with execution
of the calling process or thread.
If an error condition is detected that prevents the read request from being enqueued, returns and sets to indicate the cause of the fail-
ure. Once the read operation has been successfully enqueued, an and function referencing the referred to by must be used to determine its
status and any error conditions, including those normally reported by The request remains enqueued and consumes process and system
resources until is called.
The function allows the calling process to read from the file associated with into the buffer pointed to by The priority of the read opera-
tion is reduced by the value of which must be a value between 0 (zero) and a maximum value which can be obtained using the call with the
argument A value of 0 (zero) yields no reduction in priority. The field is ignored.
The read operation takes place at the absolute position in the file given by as if were called immediately prior to the operation with
equal to and set to However, the value of the file offset is never changed by asynchronous I/O operations.
Deallocating or altering the contents of memory referred to by while an asynchronous read operation is outstanding (i.e. before has been
called) may produce unpredictable results.
If is a valid signal event structure, then the designated signal will be delivered when the requested asynchronous read operation com-
pletes.
To use this function, link in the realtime library by specifying on the compiler or linker command line.
RETURN VALUE
returns the following values:
Successful completion, the operation has been enqueued.
Failure. The requested operation was not enqueued. is set to indicate the error.
The return value from reflects the success or failure of enqueuing the requested read operation for asynchronous processing. fails if an
error in the function call is immediately detected, or if system resource limits prevent the request from being enqueued. Other error con-
ditions are reported asynchronously and must be retrieved with and
ERRORS
If detects one of the following error conditions, is set to the indicated value:
The request could not be queued either because of a resource shortage
or because the per-process or system-wide limit on asynchronous I/O operations or asynchronous threads would have
been exceeded.
is not a valid address in the process virtual address space.
The parameters of the indicated
in are invalid.
The is already in use for another asynchronous I/O operation.
Once the read request has been enqueued by the following errors, in addition to all of the errors normally reported by the function, may be
reported asynchronously by a subsequent call to or referencing its
The was not a valid file descriptor open for reading.
The value of is not valid.
The value of is invalid.
The file offset implied by
or are not valid for the file at the time the request is processed.
The read operation was canceled due to a subsequent
call to
EXAMPLES
The following code sequence and call to starts an asynchronous read operation.
SEE ALSO
aio_cancel(2), aio_error(2), aio_fsync(2), aio_return(2), aio_suspend(2), aio_write(2), lio_listio(2), read(2), aio(5).
STANDARDS CONFORMANCE
aio_read(2)