| PLEX86 | ||
|
sigchild handling problemdual processors and linux 1766 wizzywiz "... Runqueues and load balancing Linux 2.6 is able to efficiently manage more processors than Linux 2.4, the previous stable version. The... Hi All, Can someone let me know what is the problem with this progam. When a sigchild is generated, 1. Why does wait3 returns an error and fails to find a process which has exited normally 2. The program dumps core in main function after the sigchild has been handled. Regards, Anup Mahansaria
pidt pro; void anup(); void anup1() { printf("Inside the sigchalid handler olalalala-n");
} extern "C" void sigChildHandler(int signo) { printf("Inside the sigchalid handler-n"); anup1 (); anup (); } void anup () { int status=0; int *statusp; int options; struct rusage *usage; pidt pid; printf("I am there at desired place"); options = WNOHANG WUNTRACED; { sleep (10); int j = WIFSIGNALED(*statusp); printf("-n-n-nsignal status is: %d-n", j); int i = WIFEXITED(*statusp); { printf("exit status is: %d-n", i); } else { printf("-n-n-n-n In the else partHope things works like this-n"); printf("-n-n-nexit status is: %d", i); } Using nVidia card instead of webcam fails BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I use motion and palantir and a couple of usbcams to keep an eye on things. That setup works great, but sometimes it would be nice... if (pro == pid) { printf("-n-n-n-nProcess id: %d : %d-n",pro,pid); } else printf("-n-n-n-nProcess id: %d : %d-n",pro,pid); } printf ("-nafter while-n"); -sleep (10); printf ("-nafter sleep-n"); -signal(SIGCHLD, sigChildHandler);
} extern "C" void sigHandler(int signo) { printf("Inside the sighandler-n"); } int main (int argc, char** argv, char** argp) { pidt selfprocessidm = getpid(); signal(SIGCHLD, sigChildHandler); sigsett signalSet; struct sigaction sigchildaction; sigfillset(&signalSet); sigdelset(&signalSet, SIGHUP); sigdelset(&signalSet, SIGINT); sigdelset(&signalSet, SIGCHLD); sigprocmask(SIGSETMASK, &signalSet, NULL); sigchildaction.sasigaction = NULL; sigemptyset(&sigchildaction.samask); sigaddset(&sigchildaction.samask, SIGHUP); sigaddset(&sigchildaction.samask, SIGINT); sigaddset(&sigchildaction.samask, SIGCHLD); -sigchildaction.saflags =(SANOCLDSTOP); sigchildaction.sahandler = sigHandler; sigaction(SIGHUP, &sigchildaction, NULL); sigaction(SIGINT, &sigchildaction, NULL); sigchildaction.sahandler = sigChildHandler; sigaction(SIGCHLD, &sigchildaction, NULL); pro = fork (); if (0 == pro) { printf("problem is resolved-n"); sigsett sigset; Bind forwarding zone proxy zone How Hi, I've the following problem: I have a machine IP x.x.x.x with bind 9.3 which is authoritative master for a... sigemptyset(&sigset); sigaddset(&sigset, SIGUSR1); sigaddset(&sigset, SIGUSR2); sigprocmask(SIGBLOCK, &sigset, NULL); setsid(); if (-1 == execve ("th", argv, argp)) { printf("failed to fork the process"); exit (-1); } else { printf("-n-nprocess forrked successfully-n-n"); exit (0); } } printf("-n-nInside the main function-n-n"); sleep (100); int i; scanf("%d",&i); printf("-n-nAfter the sleep....let see if it is thereInside the main function-n-n"); return 0;
|
||||
Bind forwarding zone proxy zone How Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||