Sponsored Content
Full Discussion: Infinite thread
Top Forums Programming Infinite thread Post 302482971 by Praveen_218 on Thursday 23rd of December 2010 07:54:49 AM
Old 12-23-2010
Quote:
Originally Posted by Loic Domaigne
Good evening,

This is slightly incorrect. A uncaught signal won't necessarily cause main() to go away. What happens actually, is that the signal is delivered to a particular thread in the process.

HTH, Loïc
Which thread it is delivered, if its not main() ? Request you to kindly explain in details.
 

5 More Discussions You Might Find Interesting

1. Programming

How to cancel a thread safely from the initial thread?

how about asynchronous canceling? or with signal? if with signal whether it effects the process? my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies

2. Programming

high priority thread contains an infinite loop

Hi, Assume there are 3 threads N1, N2, N3. in N1 { .... while(1) { } } when the thread N1 got the time slice, it started executing the infinite loop.. Note:there is no condition inside the while(1) to end the infinite loop I heard that some RTOS will solve this problem... (0 Replies)
Discussion started by: rvan
0 Replies

3. Shell Programming and Scripting

Infinite while loop

what is the difference between while:,while true and while false? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

4. Homework & Coursework Questions

Help with infinite loop problem

1. The problem statement, all variables and given/known data: My problem is an infinite loop when i press any other key other then Y or y in the while loop. what i want it to do is return to the normal script outside of it if pressing N or n or keep asking the same question if its any other... (4 Replies)
Discussion started by: Ren_kun
4 Replies

5. Shell Programming and Scripting

How to stop infinite loop

Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z c=0 test_loop() { c=$(($c+1)) echo "count value is : $c " sleep 1 test_loop } Im using: SunOS 5.10 PS: If run this as... (13 Replies)
Discussion started by: Arun_Linux
13 Replies
sigpause(3C)															      sigpause(3C)

NAME
sigpause - signal management SYNOPSIS
Obsolescent DESCRIPTION
The function, along with the and functions provide simplified signal management. The function removes sig from the calling thread's signal mask and suspends the calling thread until a signal is received. The function restores the thread's signal mask to its original state before returning. RETURN VALUE
The function suspends execution of the thread until a signal is received, whereupon it shall return and set to ERRORS
[EINVAL] sig is not a valid signal number. WARNINGS
The compiler option must be set to use sigpause(). The use of the function without the option is unspecified. should not be used in conjunction with signal(2) and sigspace(2). OBSOLESCENT FUNCTION
will be obsoleted in the near future. The obsolescent function blocks signals according to the value of mask, then atomically waits for an unmasked signal to arrive. On return, restores the current signal mask to the value that existed before the call. When no signals are to be blocked, a value of is used for mask. terminates when it is interrupted by a signal. When terminates, it returns -l and sets to The obsolescent function is typically used in conjunction with the obsoleted function. Threads Considerations Since blocked signal masks are maintained at the thread level, the obsolescent function modifies only the calling thread's blocked signal mask. suspends only the calling thread until it receives a signal. If other threads in the process do not block the signal, the signal may be delivered to another thread in the process and the thread in may continue waiting. For this reason, the use of sigwait(2) is recommended instead of for multi-threaded applications. For more information regarding signals and threads, refer to signal(5). LP64 Programs This obsolescent accepts a long (64 bit) value. However, as for ILP32 programs, supports signals numbered 1 through 32. The upper 32 bits of the mask argument are ignored. Author was developed by the University of California, Berkeley. SEE ALSO
kill(1), kill(2), pause(2), signal(2), wait(2), abort(3C), setjmp(3C), sighold(3C), sigignore(3C), sigrelse(3C), sigset(3C), signal(5). STANDARDS CONFORMANCE
sigpause(3C)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy