Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 09-05-2012, 02:56 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 9

Rep: Reputation: Disabled
Lightbulb Signalling suspended process through CTRL-Z



If the running process(TASK_RUNNING) is suspended using Ctrl-Z,
a) which state does it go to - TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE?
b) User can re-run(TASK_RUNNING) this suspended process by bg(background), fg(foreground) or explcitly sending CONT signal. Are these only available means to wake the suspended process? OR kernel can wake these process in other events also? (May be suspended process has registered timer handler and timer pops after the process has been suspended by CTRL-Z, resulting in waking up the process and running the timer handler and stay in TASK_RUNNING state or go back to SLEEP(TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE) state.

Thanks :-\
Old 09-07-2012, 12:40 AM   #2
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
1. Task_stopped
Old 09-18-2012, 11:21 AM   #3
LQ Newbie
Registered: Sep 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks Ygrex.

While studying signal further, I noticed in one instance where I sent a process SIGCONT signal using kill - kill(process_id, SIGCONT) and process entered in STOPPED state and kill system call did not return.

The program I was trying is to let the process run when it receives the SIGTSTP. So I registered the handler for the SIGTSTP signal and in this handler, the process sent SIGCONT signal using kill() system call. Instead of continuing, the process entered the STOPPED state. I took core dump of STOPPED process and I saw the kill() system call never returned.

What could be the reason for this behaviour by process?

The process was running when SIGSTP signal received and the signal handler ensured that It does not go into STOPPED state and yet process entered in the STOPPED state,

Old 09-21-2012, 11:25 PM   #4
Registered: Sep 2003
Posts: 382

Rep: Reputation: 87
greenday, please be aware that some signals cannot be blocked. Sometimes the signal man page in manual section 7 can be very helpful, as can be displayed by executing the command:

man -S 7 signal
If you are having some specific issue, perhaps for the sake of clarity, you could post some simple source code which illustrates the problem, and ask a very specific question about the code.


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
[SOLVED] Ctrl-C kills background process also Niraj Kulkarni Linux - Newbie 3 12-15-2008 07:11 AM
how ctrl+c works to terminate a process rithik_ghoshal Linux - General 2 11-02-2008 09:01 AM
ctrl-c to terminate a process does not work geek1234 Linux - Newbie 1 12-26-2007 03:34 PM
difference between Channel Associated Signalling and Common Channel Signalling sailu_mvn Linux - Software 3 03-31-2006 07:25 AM
How to send CTRL-D to child process via a pipe? neo_in_matrix Programming 10 09-15-2005 08:09 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:13 AM.

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