LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   how to implement suspended job handling of a shell using c (http://www.linuxquestions.org/questions/programming-9/how-to-implement-suspended-job-handling-of-a-shell-using-c-585805/)

chrislam 09-19-2007 08:26 AM

how to implement suspended job handling of a shell using c
 
in my shell i need to handle suspended job
as if type Ctrl z, the current job is suspended
for example:
[type in your command ]$ cat
^C

then cat is suspended
and the command can be "cat | cat"

i what to get some ideas of how to do it

and the other question, if the parent process is suspended, will the child process also be suspended together?

wjevans_7d1@yahoo.co 09-19-2007 11:43 AM

You suspend a process by sending a specific signal to it. To get the most out of your class assignment, do this at the command line:
Code:

man 2 kill
man 7 signal

And since this is a class assignment, the best way to answer your final question is:

Try it!

Hope this helps.


All times are GMT -5. The time now is 10:00 PM.