All about programming in GNU/LINUX


Its not possible for a background process to read from the standard input .You can try this by issuing the following command “cat > test.txt & ” , then hit enter Twice .The process will be suspended as the signal ‘SIGTTIN’ will be generated , and the process will be suspended.But a background process can write into standard output .But this feature can be disabled by using “stty tostop” command from the terminal.Under this circumstance when stty is set a background process which tries to write into the standard output will be sent “SIGTTOU” signal and the process will be suspended . To continue the process which were suspended by them SIGCONT signal  has to be sent to them .Image


2 responses

  1. karthik bhat

    Very Informative 🙂

    August 15, 2012 at 5:17 am

  2. Thank you 🙂 there was a serious mistake in the post …I’ve corrected it nw 🙂 In the further posts i’l be teaching on how to catch these signals and process them 🙂

    August 15, 2012 at 11:32 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s