01-12-2006
Try This
Hi,
Thanks for the ftp C reply,
May be you could try this to track all the child process
#include<signal.h>
static void handle_child_process(int sig)
{
/* this will print all the child proccess status code termination values */
int stat;
printf("%d",wait(&stat));
}
int main()
{
struct sigaction child_signal;
memset(&chld_signal, 0, sizeof(struct sigaction));
child_signal.sa_handler = &handle_child_process;
sigaction(SIGCHLD, &child_signal, 0);
/*
your
code
here
wahtever
it is
*/
exit(EXIT_SUCCESS);
}
/*
do something like this
*/
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm having trouble with Abnormal Termination errors. What are they, what causes them and how can I prevent them from happening? Are they application specific? (2 Replies)
Discussion started by: bialsibub
2 Replies
2. HP-UX
Hi All,
i am running a oracle procedure which writes a file . The same file is picked up by another script which runs in a cron after every 5 minutes.
Now the problem is that sometimes my script picks up a file while the procedure is still writing data in the file.
is there is any way i... (4 Replies)
Discussion started by: saurabhjain
4 Replies
3. Filesystems, Disks and Memory
Hello, have a look my top and ps as below
Inact memory reach 1.6G, does it normal ?
load averages: 0.07, 0.02, 0.01; up 7+06:48:52 02:58:01
91 processes: 2 running, 89 sleeping
CPU states: 0.0% user, 0.0% nice, 0.4% system, 0.0% interrupt, 99.6% idle
Memory: 24M... (0 Replies)
Discussion started by: jipznet1981
0 Replies
4. Shell Programming and Scripting
Is there a way I can run a command that will run in the kernel or in the memory and automatically kill certain scripts if they get to <defunct> processes, without having to be monitoring the server manually?
I have a Perl script which runs for 20k members and normally does not have any problems,... (2 Replies)
Discussion started by: ukndoit
2 Replies
5. HP-UX
i am using HP-UX and i have this process called HPUX childwrapper taking about 99% cpu.i want to know what the process does? and if i should kill it (4 Replies)
Discussion started by: tomjones
4 Replies
6. Red Hat
Hey,
I've got a program that fork's a list of child processes, and keeps their pid's in a list.
After the parent finishes it's main business logic, it needs to check which child already finished - and when.
Is it possible - using waitpid or any other func\syscall - get this information... (0 Replies)
Discussion started by: sternr
0 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am facing problems with defunct processes. The problem is, the defuncts are being created and getting dissappeared by themselves.
I have a process that calls some scripts through a specified port, when this scripts starts executing, the defuncts also started to appear(lots and lots, will... (1 Reply)
Discussion started by: reddybs
1 Replies
8. Shell Programming and Scripting
ok, so i have no clue why this script i wrote spits out these bizarre characters:
i cant even copy and paste those characters on here because it just doesn't show up properly.
my question is, using sed, how can i get rid of all characters that aren't normal?
echo "abnormal characters" |... (4 Replies)
Discussion started by: SkySmart
4 Replies
9. UNIX for Dummies Questions & Answers
i'm grepping for words in the /var/adm/messages (sun solaris).
but it looks like while my grepping finds the strings, when it outputs them out, the beginning of some lines are chopped off.
Jun 13 14:06:02 sky.net ufs: NOTICE: alloc: /prod: file system full
3 14:39:19 sky.net ufs: NOTICE:... (1 Reply)
Discussion started by: SkySmart
1 Replies
10. UNIX for Beginners Questions & Answers
In solaris, orphan process is put to sleep mode and does not consume any CPU resources. In Linux, orphan process is kept in running state consuming all CPU and Ram resources. Is it the case? Is there a difference on how these operating systems will handle orphan processes?
The route cause of... (10 Replies)
Discussion started by: Belure Pooja B
10 Replies