11-17-2014
The most common reasons for an application to die with a segmentation fault (assuming no one explicitly sent it a SIGSEGV signal) are:
- using an uninitiaized pointer,
- buffer overflow (allocating a buffer of size x and writing into buffer[n] where n >= x or n < 0 [in C, valid array offsets are 0 to n-1]), or
- searching for the end of a string in a character array that does not include a terminating null byte.
10 More Discussions You Might Find Interesting
1. Programming
Hi Everybody,
I have gone through man of sigwait and new to UNIX signals. Could anyone explain me about the following lines mentioned in sigwait man help ?
"The selection of a signal in set is independent of the signal
mask of the calling thread or LWP. This means a thread or
LWP can ... (1 Reply)
Discussion started by: md7ahuja
1 Replies
2. Programming
Hi All,
When I ran a multithreaded program in c++, it was core dumped
when its core was analysed
it indicated that the program was terminated with signal 9.
Signal 9 cannot be caught or interrupted.
When i analyzed the core further, it showed SING error
what could be the reason for... (6 Replies)
Discussion started by: matrixmadhan
6 Replies
3. AIX
I have some questions :
1) We can system backup manual by remotely? (Ex: we peform backup a AIX system in Japan from US)How we can do?
2) We can build a script to system backup automatically? How we can do?
3) We can use which third party to do that? Which tool?
Thanks (1 Reply)
Discussion started by: guest
1 Replies
4. HP-UX
Hi all,
I am getting coredump in one of our programs. The last few lines of the tucs output are as below :
read(8, "\adb\0\006\0\0\0\0\0060 0 9 2 6 ".., 2064) ...... = 2011
read(8, "\adb\0\006\0\0\0\0\07 4 1 4 5 03".., 2064) ...... = 2011
read(8, "\adb\0\006\0\0\0\0\00 2 6 030 0 ".., 2064)... (0 Replies)
Discussion started by: santosh.mane
0 Replies
5. Shell Programming and Scripting
I honestly tried searching for this in this forum and in google. Maybe I found the answer but didn't even realized it.
I would like to run shell script thats on my machine that collects the hostname and IP address from the remote system and sends the output to my machine.
I'm not sure if need... (2 Replies)
Discussion started by: elbombillo
2 Replies
6. UNIX for Advanced & Expert Users
Hi,
When i run the code in solaris unix machine, the file from remote server is getting downloaded. but when i use the same code in IBM AIX remote machine, it is not running. It is saying "Erro during scp transfer." Below is the code.
Please give some resolution.
SCPClient client = new... (1 Reply)
Discussion started by: gravi2020
1 Replies
7. Solaris
how to login with ssh to remote system with out applying the remote root/user password
with rlogin we can ujse .rhosts file
but with ssh howits possible
plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies
8. Shell Programming and Scripting
Hi Friends,
I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies
9. Shell Programming and Scripting
Hi,
I have an shell script program in a remote linux machine which will do some specific monitoring functionality. Also, have some C executables in that machine.
From a windows machine, I want to run the shell script program (If possible using java).
I tried with SSH for this. but, in... (1 Reply)
Discussion started by: ram.sj
1 Replies
10. Shell Programming and Scripting
Hello Every one!!
I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server.
Before this I am using a sudo command to change the user.
The place where I am stuck is, I am able to connect to the... (6 Replies)
Discussion started by: masubram
6 Replies
setbuf(3S) setbuf(3S)
NAME
setbuf(), setvbuf(), setlinebuf() - assign buffering to a stream file
SYNOPSIS
Obsolescent Interface
DESCRIPTION
can be used after a stream has been opened but before it is read or written. It causes the array pointed to by buf to be used instead of
an automatically allocated buffer. If buf is the NULL pointer input/output will be completely unbuffered.
A constant defined in the header file, tells how big an array is needed:
can be used after a stream has been opened but before it is read or written. type determines how stream is to be buffered. Legal values
for type (defined in are:
causes input/output to be fully buffered.
causes output to be line buffered;
the buffer will be flushed when a newline is written, the buffer is full, or input is requested.
causes input/output to be completely unbuffered.
When an output stream is unbuffered, information is queued for writing on the destination file or terminal as soon as written; when it is
buffered, many characters are saved up and written as a block. When the output stream is line-buffered, each line of output is queued for
writing on the destination terminal as soon as the line is completed (that is, as soon as a new-line character is written or terminal input
is requested). can also be used to explicitly write the buffer.
If buf is not the NULL pointer, the array it points to is used for buffering instead of an automatically allocated buffer (from size speci-
fies the size of the buffer to be used. The constant in is suggested as a good buffer size. If input/output is unbuffered, buf and size
are ignored.
By default, output to a terminal is line buffered and all other input/output is fully buffered.
is used to change stream from block-buffered or unbuffered to line-buffered. can be used any time the file descriptor is active.
Obsolescent Interface
assigns buffering to a stream file.
DIAGNOSTICS
If an illegal value for type or size is provided, return a non-zero value. Otherwise, the value returned will be zero.
Note
A common source of error is allocating buffer space as an "automatic" variable in a code block, then failing to close the stream in the
same block.
Allocating a buffer of size or bytes does not necessarily imply that all of size or bytes are used for the buffer area.
AUTHOR
and were developed by HP.
SEE ALSO
flockfile(3S), fopen(3S), getc(3S), malloc(3C), putc(3S), stdio(3S), thread_safety(5), glossary(9).
STANDARDS CONFORMANCE
setbuf(3S)