01-12-2010
Try pthread_join() to wait for the thread to end.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello all,
I tried a program on an array to intialise array elements from the standard input device.it is an integer array of 5 elements.but after entering the 4th element it throws a message called "Segmentation Fault" and returns to the command prompt without asking for the 5th element.
... (3 Replies)
Discussion started by: compbug
3 Replies
2. AIX
Hi ,
During execution a backup binary i get following error
"Program error 11 (Segmentation fault), saving core file in '/usr/datatools"
Riyaz (2 Replies)
Discussion started by: rshaikh
2 Replies
3. Linux
Hi,
on a linux Red HAT(with Oracle DB 9.2.0.7) I have following error :
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
Segmentation fault
What does it mean ? And the solution ?
Many thanks. (0 Replies)
Discussion started by: big123456
0 Replies
4. Programming
Hi,
Why I don't receive a segmentation fault in the following sample.
int main(void)
{
char buff;
sprintf(buff,"Hello world");
printf("%s\n",buff);
}
If I define a buffer of 10 elements and I'm trying to put inside it twelve elements, Should I receive a sigsev... (22 Replies)
Discussion started by: lagigliaivan
22 Replies
5. Programming
If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife == 0)
Would I get error at life->nolife if it is equal to 0.
wrong accession? (3 Replies)
Discussion started by: joey
3 Replies
6. UNIX for Dummies Questions & Answers
#include<stdio.h>
#include<malloc.h>
#include<unistd.h>
#include<stdlib.h>
void *start_1(void *argv)
{
printf("thread 0x%x\n",(unsigned int)pthread_self());
pthread_exit((void*)1);
}
void *start_2(void *argv)
{
printf("thread 0x%x\n",(unsigned int)pthread_self());
return (void*)2;
}... (2 Replies)
Discussion started by: vincent__tse
2 Replies
7. Programming
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)
Discussion started by: pooyair
6 Replies
8. Homework & Coursework Questions
this is a network programming code to run a rock paper scissors in a client and server.
I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault.
-the segmentation fault is fixed
Current problem -Also... (3 Replies)
Discussion started by: femchi
3 Replies
9. Solaris
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)
Discussion started by: cjashu
2 Replies
10. Programming
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 DEBIAN
dnet_addr
DNET_ADDR(3) Library Functions Manual DNET_ADDR(3)
NAME
dnet_addr - DECnet nodename to address translation
SYNOPSIS
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
struct dn_naddr *dnet_addr (char *nodename)
DESCRIPTION
dnet_addr search the decnet hosts file for nodename and returns the DECnet address in the dn_naddr structure
If no entry is found, returns NULL
EXAMPLE
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#include <sys/socket.h>
main(void)
{
struct dn_naddr *binaddr;
struct sockaddr_dn sockaddr;
int sockfd;
if ( (binaddr=dnet_addr("mv3100")) == NULL)
{
printf("No entry in /etc/decnet.conf for mv3100
");
exit(0);
}
if ((sockfd=socket(AF_DECnet,SOCK_SEQPACKET,DNPROTO_NSP)) == -1)
{
perror("socket");
exit(-1);
}
sockaddr.sdn_family = AF_DECnet;
sockaddr.sdn_flags = 0x00;
sockaddr.sdn_objnum = 0x19; /* MIRROR */
sockaddr.sdn_objnamel = 0x00;
memcpy(sockaddr.sdn_add.a_addr, binaddr->a_addr,binaddr->a_len);
if (connect(sockfd, (struct sockaddr *)&sockaddr,
sizeof(sockaddr)) < 0)
{
perror("connect");
exit(-1);
}
close(sockfd);
}
SEE ALSO
dnet_htoa(3), dnet_ntoa(3), dnet_conn(3), getnodeadd(3), getnodebyname(3), getnodebyaddr(3), setnodeent(3)
DECnet database functions July 28, 1998 DNET_ADDR(3)