LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2007, 08:26 AM   #1
chrislam
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
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?
 
Old 09-19-2007, 11:43 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling I/O redirections in my shell. Sebouh Programming 2 04-10-2007 01:31 PM
file handling shell script ankit_mcgill Programming 6 04-29-2006 12:32 AM
Shell Script.. Date format handling C-RAF. Programming 2 02-14-2006 08:34 AM
Shell implement in c SatYr_84 Programming 8 10-06-2005 12:44 AM
Need help w/ shell handling 3 commands/2 pipes sptchamp Programming 3 07-15-2004 09:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration