Hi all,
I am attempting to read tar images from a DLT tape, and have recieved an error, which i don't know:
tar: blocksize = 8
tar: directory checksum error
I have been able to read from other tapes, using the same command (tar -tvf /devicename) but this time i have an... (3 Replies)
I have been attempting to read a DLT tape, but encountered problems. I have applied patches from SUN that 'resolve' known problems with tape reading etc...but still the error!
Techsupport reckon that the data/tape is corrupt. I would like to think they aren't.
Are there any issues with... (10 Replies)
I have a script that reads a file then moves all the files that are listed within that file.
So read file A then copy all files that are listed within.
I have the script append a log everytime a file is moved.
My issue is that it's appending the log even though the file was not found.
... (3 Replies)
Hi,
I'm trying to install Solaris 10 on my Ultra 10 but it won't boot. I tried an original cd and a downloaded one. I got the following error:
"error reading sectors" (yes, i checked the md5 sums)
For the complete error see the following shot:
... (2 Replies)
Hi,
Program A: uses pipe()
I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using:
* child
-> dup2(fd, STDOUT_FILENO);
-> execl("/path/PROGRAM B", "PROGRAM B", NULL);
* parent
-> char line;
-> read(fd, line, 100);
Question:
---------... (1 Reply)
Hi,
Program A: uses pipe()
I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using:
* child
-> dup2(fd, STDOUT_FILENO);
-> execl("/path/PROGRAM B", "PROGRAM B", NULL);
* parent
-> char line;
-> read(fd, line, 100);
Question:
---------... (3 Replies)
Hello,
I've managed to get my .procmailrc file to work. At least it triggers a script which creates a file. But the file is empty. How do I get at the data that's been piped? I've done much creative googling to no avail. I belive it should be in stdin, but I can't figure out how to access... (4 Replies)
Hi - I am getting the error
`Error reading response length from authentication socket'
when I ssh from my cluster to another cluster, and then back to my cluster. It doesn't seem to affect anything, but it's just annoying that it always pops up and tends to confuse new users of the cluster. I... (1 Reply)
Hello...
i got an error in my SCO OpenServer 6. the error is:
msgcnt 1 vxfs: mesg 016: vx_ilisterr - / file system error reading inode 373
Can anyone help me? (1 Reply)
script:
while read inputline; do
if ; then
if ; then
break
fi
fi
done
Looks like the script hangs when stdin is empty or contains space. Any ideas on how to circumvent this? is it possible to use getline to process stdin content? (4 Replies)
Discussion started by: ux4me
4 Replies
LEARN ABOUT SUNOS
setbuffer
setbuffer(3C) Standard C Library Functions setbuffer(3C)NAME
setbuffer, setlinebuf - assign buffering to a stream
SYNOPSIS
#include <stdio.h>
void setbuffer(FILE *iop, char *abuf, size_t asize);
int setlinebuf(FILE *iop);
DESCRIPTION
The setbuffer() and setlinebuf() functions assign buffering to a stream. The three types of buffering available are unbuffered, block
buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as writ-
ten; when it is block buffered, many characters are saved and written as a block; when it is line buffered, characters are saved until
either a NEWLINE is encountered or input is read from stdin. The fflush(3C) function may be used to force the block out early. Normally all
files are block buffered. A buffer is obtained from malloc(3C) upon the first getc(3C) or putc(3C) performed on the file. If the standard
stream stdout refers to a terminal, it is line buffered. The standard stream stderr is unbuffered by default.
The setbuffer() function can be used after a stream iop has been opened but before it is read or written. It uses the character array abuf
whose size is determined by the asize argument instead of an automatically allocated buffer. If abuf is the null pointer, input/output
will be completely unbuffered. A manifest constant BUFSIZ, defined in the <stdio.h> header, tells how large an array is needed:
char buf[BUFSIZ];
The setlinebuf() function is used to change the buffering on a stream from block buffered or unbuffered to line buffered. Unlike set-
buffer(), it can be used at any time that the stream iop is active.
A stream can be changed from unbuffered or line buffered to block buffered by using freopen(3C). A stream can be changed from block
buffered or line buffered to unbuffered by using freopen(3C) followed by setbuf(3C) with a buffer argument of NULL.
RETURN VALUES
The setlinebuf() function returns no useful value.
SEE ALSO malloc(3C), fclose(3C), fopen(3C), fread(3C), getc(3C), printf(3C), putc(3C), puts(3C), setbuf(3C), setvbuf(3C)NOTES
A common source of error is allocating buffer space as an "automatic" variable in a code block, and then failing to close the stream in the
same block.
SunOS 5.10 13 May 1997 setbuffer(3C)