sometimes for this code i get a segmentation fault for codes llike this
:
int main{
int * a= 0;
int b;
a = (int*)malloc(sizeof(int));
///some code using these variable but no freeing of a
if(a){
free(a);
a = 0;
}
return... (3 Replies)
I have written a program which takes a directory as command line arguments and displays all the dir and files in it.
I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Hi ,
During execution a backup binary i get following error
"Program error 11 (Segmentation fault), saving core file in '/usr/datatools"
Riyaz (2 Replies)
Hi,
I am having this segmentation fault not in the following program, bt. in my lab program . My lab program is horrible long so cannot post it here bt. I am using the following logic in my program which is giving the segmentation fault. Bt. if I run this sample program as it is it dosen't give... (3 Replies)
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char*... (1 Reply)
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Hi Guys,
I just installed and booted a zone called testzone. When I logged in remotely and tried changing to root user I get this error:
"Segmentation fault"
Can someone please help me resolve this?
Thanks alot (2 Replies)
Hi everyone
Need to get version of npm application that have several output like this:
root: nmp -version
10
root: nmp -version
10
root: nmp-new -version
3.1
root: nmp-old -version
Segmentation fault
count them , after that write to the file like this:
10 2
3.1 1 (1 Reply)
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT HPUX
sigsetops
sigsetops(3C)sigsetops(3C)NAME
sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember() - initialize, manipulate, and test signal sets
SYNOPSIS DESCRIPTION
initializes the signal set pointed to by set, to exclude all signals supported by HP-UX.
initializes the signal set pointed to by set, to include all signals supported by HP-UX.
Applications must call either or at least once for each object of type before using that object for anything else, including cases where
the object is returned from a function (for example, the oset argument to -- see sigprocmask(2)).
adds the signal specified by signo to the signal set pointed to by set.
deletes the signal specified by signo from the signal set pointed to by set.
tests whether the signal specified by signo is a member of the signal set pointed to by set.
RETURN VALUE
Upon successful completion, returns a value of 1 if the specified signal is a member of the specified set, or a value of 0 if it is not.
The other functions return a value of 0 upon successful completion. For all of the above functions, if an error is detected, a value of -1
is returned and is set to indicate the error.
ERRORS
and fail if the following is true:
[EINVAL] The value of the signo argument is out of range.
WARNINGS
The above functions do not detect a bad address passed in for the set argument. A segmentation fault is the most likely result.
AUTHOR
and were derived from the
SEE ALSO sigaction(2), sigsuspend(2), sigpending(2), sigprocmask(2), signal(5).
STANDARDS CONFORMANCE sigsetops(3C)