Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to prevent gdb to send Interrupt signals to child processes Post 302281984 by klnarayana on Friday 30th of January 2009 01:41:50 AM
Old 01-30-2009
Hi,

Thanks for your help.

My parent process just provides me the gui to interact with the child process. Hence I am not bothered about my parent process dying. However I am very much interested in cotrolling my child process through the parent process.

My parent process launches xterm window through which I can communicate with my child process. So when I say interrupt through gdb, the signal is being sent to xterm window. The xterm window is not able to handle the interrupt signal and hence dying. Here I have no control over xterm window or my child process.

Can you suggest me some other solution which can be implemented from parent process or from gdb side?

Thanks once again for the reply.

Regards,
lakshminarayana
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what are parent and child processes all about?

I don't follow what these are... this is what my text says... "When a process is started, a duplicate of that process is created. This new process is called the child and the process that created it is called the parent. The child process then replaces the copy for the code the parent... (1 Reply)
Discussion started by: xyyz
1 Replies

2. Programming

Controlling child processes

Hello all, I am trying to create n child processes and control them from a parent process; say make child 3 print its pid and then child 5 do the same and some other stuff. Is there a way to accomplishing this after all the child processes are created via a call to fork(). Thank you, FG (23 Replies)
Discussion started by: forumGuy
23 Replies

3. UNIX for Advanced & Expert Users

gdb to child process

Hi, I want to debug a child process which is forked from other process. Whenever I try to attach the pid of child process to gbd, the process gets killed and the parent process starts a new child process. any idea what could be the reason. In general how can i debug a child process... (4 Replies)
Discussion started by: shriashishpatil
4 Replies

4. Shell Programming and Scripting

Parent/Child Processes

Hello. I have a global function name func1() that I am sourcing in from script A. I call the function from script B. Is there a way to find out which script called func1() dynamically so that the func1() can report it in the event there are errors? Thanks (2 Replies)
Discussion started by: yoi2hot4ya
2 Replies

5. Programming

fork() and child processes

Hello, How many child processes are actually created when running this code ? #include <signal.h> #include <stdio.h> int main () { int i ; setpgrp () ; for (i = 0; i < 10; i++) { if (fork () == 0) { if ( i & 1 ) setpgrp () ; printf ("Child id: %2d, group: %2d\n", getpid(),... (0 Replies)
Discussion started by: green_dot
0 Replies

6. Shell Programming and Scripting

fork() and child processes

Hello, How many child processes are actually created when running this code ? #include <signal.h> #include <stdio.h> int main () { int i ; setpgrp () ; for (i = 0; i < 10; i++) { if (fork () == 0) { if ( i & 1 ) setpgrp () ; printf ("Child id: %2d, group: %2d\n",... (1 Reply)
Discussion started by: green_dot
1 Replies

7. UNIX for Advanced & Expert Users

killing all child processes

Hi, Is there a way I can kill all the child processes of a process, given its process id. Many thanks in advance. J. (1 Reply)
Discussion started by: superuser84
1 Replies

8. Programming

How to block or ignore signals from certain processes?

We know that a process can block certain signals by call sigprocmask(), but sometimes we may want to block signals from certain processes for safety concerning. For example, a system may have a process management daemon, and it will response to certain signals from certain processes managed by... (4 Replies)
Discussion started by: aaronwong
4 Replies

9. Programming

sending signals between two processes

Hello, I have two programs: server.c and client.c I need to send signal from client to server. As far as I know I need to use kill() function. To use kill() function I have to know the pid the second process. How can I send pid from process to process(both are written in separate files). ... (3 Replies)
Discussion started by: fasolens
3 Replies

10. Shell Programming and Scripting

Get all child processes of a process

is there a universal way of getting the children of a particular process? i'm looking for a solution that works across different OSes...linux, aix, sunos, hpux. i did a search online and i kept finding answers that were specific to Linux..i.e. pstree. i want to be able to specify a process... (2 Replies)
Discussion started by: SkySmart
2 Replies
vfork(2)							System Calls Manual							  vfork(2)

NAME
vfork - spawn new process; share virtual memory SYNOPSIS
REMARKS
is a higher performance version of that is provided on some systems where a performance advantage can be attained. If the calling process is multi-threaded, the newly created child process will only contain one thread. This one thread will be a copy of the thread calling differs from only in that the child process can share code and data with the calling process (parent process). This speeds cloning activ- ity significantly at a risk to the integrity of the parent process if is misused. The use of for any purpose except as a prelude to an immediate or is not supported. Any program that relies upon the differences between and is not portable across HP-UX systems. All HP-UX implementations must provide the entry but it is permissible for them to treat it identically to On some implementations the two are not distinguished because the implementation is as efficient as possible. Other versions may do the same to avoid the overhead of sup- porting two similar calls. DESCRIPTION
can be used to create new processes without fully copying the address space of the old process. If a forked process is simply going to do an (see exec(2)), the data space copied from the parent to the child by is not used. This is particularly inefficient in a paged environ- ment, making particularly useful. Depending upon the size of the parent's data space, can give a significant performance improvement over differs from in that the child borrows the parent's memory and thread of control until a call to or an exit (either by a call to or abnor- mally (see exec(2) and exit(2)). The parent process is suspended while the child is using its resources. returns 0 in the child's context and (later) the pid of the child in the parent's context. can normally be used just like It does not work, however, to return while running in the child's context from the procedure which called since the eventual return from would then return to a no longer existent stack frame. The window begins at the call and ends when the child completes its call. RETURN VALUE
Upon successful completion, returns a value of 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent, no child process is created, and is set to indicate the error. ERRORS
fails and no child process is created if any of the following conditions are encountered: The system-wide limit on the total number of processes under execution would be exceeded. The system-imposed limit on the total number of processes under execution by a single user would be exceeded. DEPENDENCIES
Servers Process times for the parent and child processes within the window may be inaccurate. Parent and child processes share the same stack space within the window. If the size of the stack has been changed within this win- dow by the child process (return from or call to a function, for example), it is likely that the parent and child processes will be killed with signal or In the window, a call to (see signal(2) that installs a catching function can affect handling of the signal by the parent. The par- ent is not affected if the handling is being set to or or if is used (see sigaction(2)). AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
exec(2), exit(2), fork(2), sigaction(2), wait(2). vfork(2)
All times are GMT -4. The time now is 09:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy