SIGSTOP ignored?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > SIGSTOP ignored?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    SIGSTOP ignored?  
blah243@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-07 12:21 AM

Hello, I am debugging something and would like a process to suspend
temporarily. I wrote a script to send a SIGSTOP signal to that process
when another process is present. However, after receiving SIGSTOP, the
process I want to suspend keeps executing. I know that process get the
SIGSTOP from strace:

[pid  6850] 07:18:58.562518 --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[pid  6850] 07:18:58.562749 --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[pid  6850] 07:18:58.562970 wait4(-1, NULL, 0, NULL) = 6900
[pid  6850] 07:18:58.566868 open("/tmp/data-6850", O_RDONLY) = 3
[pid  6850] 07:18:58.567065 fstat(3, {st_mode=S_IFREG|0644,
st_size=5, ...}) = 0
[pid  6850] 07:18:58.567218 mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af684160000
[pid  6850] 07:18:58.567315 fstat(3, {st_mode=S_IFREG|0644,
st_size=5, ...}) = 0
[pid  6850] 07:18:58.567450 lseek(3, 0, SEEK_SET) = 0
[pid  6850] 07:18:58.569768 read(3, "6904\n", 5) = 5
[pid  6850] 07:18:58.570754 lseek(3, 5, SEEK_SET) = 5
[pid  6850] 07:18:58.570906 close(3)    = 0
[pid  6850] 07:18:58.571067 munmap(0x2af684160000, 4096) = 0

Does anybody know how this could be possible? SIGSTOP should not be
ignored, caught, or blocked.

Thanks.






[ Post a follow-up to this message ]



    Re: SIGSTOP ignored?  
Stephane CHAZELAS


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-07 12:21 PM

2007-07-14, 00:12(-00), blah243@gmail.com:
> Hello, I am debugging something and would like a process to suspend
> temporarily. I wrote a script to send a SIGSTOP signal to that process
> when another process is present. However, after receiving SIGSTOP, the
> process I want to suspend keeps executing. I know that process get the
> SIGSTOP from strace:
>
> [pid  6850] 07:18:58.562518 --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
> [pid  6850] 07:18:58.562749 --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[...]

SIGSTOP can't be trapped/ignored, here the behavior you observe
is due to strace and the way it works. If you're interested, you
can have a look at the ptrace(2) man page, that's what strace
uses to trace a command.

--
Stéphane





[ Post a follow-up to this message ]



    Re: SIGSTOP ignored?  
Roger Leigh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-07 12:21 PM






[ Post a follow-up to this message ]



    Re: SIGSTOP ignored?  
Spoon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-25-07 06:21 PM

Roger Leigh wrote:

> blah243 wrote:
> 
>
> Is there a SIGSTOP signal handler?  Or, is it set to SIG_IGN?

"That's un-possible!"

http://www.opengroup.org/onlinepubs.../sigaction.html

The system will not allow the action for the signals SIGKILL or SIGSTOP
to be set to SIG_IGN.

The system will not allow a process to catch the signals SIGKILL and
SIGSTOP.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:49 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register