|
Blue Forest http://www.lslnet.com at 15:28 on July 31, 2006
|
|
Whether the signal system call will be interrupted?
|
|
Whether the signal system call will be interrupted? Or that it will be all or part?
|
|
|
Re : Does signal system call will be interrupted?
|
|
SA_RESTART sigaction change with the use of signal behavior and the parameters, the system calls automatically restarted!~ counterparts were interrupted my understanding is that this is not the signal was cut off (the previous system call was interrupted, it is no longer).
|
|
|
Re : Does signal system call will be interrupted?
|
|
Then all of the signals are not installed? Not a lot of trouble.
I also see the return of some of the mistakes there is not EINTR system calls, such as open in the no man page Lane mentioned that the show will not be open forever because it signals occur when the normal working machine.
|
|
|
Re : Does signal system call will be interrupted?
|
|
1, had set up SA_RESTART specific look 10.12 APUE program, how can automatically restart the system call. 2, for the access, open system call is not slow, and only slow system call can be interrupted.
|
|
|
Re : Does signal system call will be interrupted?
|
|
"1, had set up SA_RESTART specific look 10.12 APUE program, how can automatically restart the system call.
Thank you can return. I see no signal was interrupted and failed to return any benefits, and I do not know why the introduction of such a mechanism?
This sometimes will introduce many hidden dangers. For example, if the complex signal processing system that is part of the preparation and use of the others, it does not set RESTAKT signal attributes. Another part of the code may be used Calling signal interruption, and no detection EINTR wrong, then it is not known who is responsible for this : a) In other words, a style which is the better way?
2, for the access, open system call is not slow, and only slow system call can be interrupted.
Instead, I see a close EINTR wrong. Is that close than open more slowly? Also open sometimes takes a lot of time to find out directories, etc., but no faster than the read to complete. I wonder if the so-called "slow" is a definition?
|
|
|
Re : Does signal system call will be interrupted?
|
|
1. A process for the implementation of a 'slow' system call by block, may carry a long-term, the introduction of the system call which has been suspended for this mechanism to awaken the process may be disrupted; But this also led to trouble, procedures must determine errno=EINTR to see whether the need to restart the system call. For this reason, wanted to deal strategy is to be automatically re-enable system call was interrupted. Such changes to the current end of each signal can be constant SA_RESTART to determine suspension system call, whether to an automatic response system call to resume. A process only a signal behavior (corresponding signal which 31). "It does not set RESTAKT signal attributes. Another part of the code may be used Calling signal interruption, and no detection EINTR wrong? Since the signals (A, not all), then the other code (within the scope of the signal behavior), a system call was interrupted and the signal it will not automatically restart, only to return errno=EINTR to deal with their own procedures. This is considered a programmer! ~
2. 'Slow' in reference to the English P276 and see! ! ~
|
|
|
Re : Does signal system call will be interrupted?
|
|
One possible obstruction of the system call will be interrupted under what circumstances, it was time for a long interruption? Who is the kernel system call interrupted the transmission of signals?
Calling System has been suspended after less obstructive to the resumption of the return of wasted CPU. . .
I would like to introduce by the middle : System Call mechanism objective is to "slow system call can be interrupted, so after other treatment (and not reopen)." . Failure to resume the introduction of the mechanism had to pay the price. . .
|
|
|
Re : Does signal system call will be interrupted?
|
|
"1. A process for the implementation of a 'slow' system call by block, may carry a long-term, the introduction of the system call which has been suspended for this mechanism to awaken the process may be disrupted;
Can examples of the "long block it," the disadvantages, as well as a mechanism to be awakened signals, in order to prevent such harm, testing procedures after EINTR do to compensate (at least not be a simple re-issued system call, it did not go well were kernel).
"Since the signals (A, not all), then the other code (within the scope of the signal behavior), a system call was interrupted and the signal it will not automatically restart, only to return errno=EINTR to deal with their own procedures. This is considered a programmer! ~
What I mean is, the preparation of a part of the people do not know the other part to the use of the signal, and therefore does not EINTR for inspection, thus creating a hidden danger. For example some people use the SIGIO signals, the use of another part of the SIGALRM signal, some do not use any signal, and link them together into a final code with a process. But should require all of them to return to check EINTR such a mistake? Or those who use the signal should be provided for the signal attributes SA_RESTART?
"2. 'Slow' in reference to the English P276 and see! ! ~ I do not know what you say in English. But I will find time to pay attention to this information. Thanks again reply.
|
|
|
Re : Does signal system call will be interrupted?
|
|
"I would like to introduce by the middle : System Call mechanism objective is to" slow system call can be interrupted, so after other treatment (and not reopen). " . Failure to resume the introduction of the mechanism had to pay the price. . .
I can think of in addition to "test for overtime, and then determine Call failure" of such an act, I do not know what other good alternatives? As detection overtime, why not do enough from the core together, we are waiting for a return! ETIMEOUT wrong :)
|
|
|
Re : Does signal system call will be interrupted?
|
|
Many of the contents of this discussion will lead to many, many people not understand the concept! High-see Unix Programming Environment, classic.
"Long block it," This is the greatest disadvantages. Signal, signal Group, signal shielding concept, you might not understand! Look at the book, there are problems about the discussions.
|
|
|
Re : Does signal system call will be interrupted?
|
|
Not even seen, I do not think the so-called cattle in the book stresses how well that is not how I understand anyway.
Frankly speaking, the book actually many poor-quality, which accounts for only the contents of all, few other aspects of this book cheaper.
|
|
|
Re : Does signal system call will be interrupted?
|
|
:
Frankly speaking, the book actually many poor-quality, which accounts for only the contents of all, few other aspects of this book cheaper.
Parts? which i have not finished reading the book yet. Would you kindly point out to me, i may skip it to save time
|
|
|
Re : Does signal system call will be interrupted?
|
|
"Many of the contents of this discussion will lead to many, many people not understand the concept! High-see Unix Programming Environment, classic. "" Long block it, "This is the greatest disadvantages. "Signal, signal Group, signal shielding concept, you might not understand!
呵~ uh, I spent a lot of signals, signal collection, early signal shielding are used. So thorough study may not simply because I can solve the problems we encounter is that many have not read the book again, and only later look at some of the details. 1) I take possession of all the signals. Use of the system will not allow any pre-signal processing. Robustness in order to create a false log. 2) I prepared LRMI turn Palapa Calling BIOS and found that signal interference, I will only signal shielding all normal. 3) I need all the network communications SIGIO signals to send and receive data. 4) I use setitimer issued SIGALRM signal of a user-level multi-task scheduling. 5) wrote many device driver involved interrupt service routine. Into fast and slow interrupted know interruption. 6) process is not interrupted and interrupted sleep can be divided into, which is aware of this.
SA_RESTART Although not used (as you have said, the programmer is responsible for inspection EINTR). But sigaction installed SA_RESTART usage is actually very simple. I just want to know whether this mechanism is very necessary? Think it will bring hidden dangers than benefits procedures, attention to the need for programmers to code whether EINTR mistakes. I think there will be a better alternative.
|
|
|
Re : Does signal system call will be interrupted?
|
|
"Many of the contents of this discussion will lead to many, many people not understand the concept! High-see Unix Programming Environment, classic.
I am sorry, but I have a look at their shelves "Linux Advanced Programming," but not the "high-level programming environment for Unix," My general view of Linux books. About doubled in the catalog, which is the application layer software applications, and you say that this seems totally different categories :) Thank you!
|
|
|
Re : Does signal system call will be interrupted?
|
|
SA_RESTART Although not used (as you have said, the programmer is responsible for inspection EINTR). But sigaction installed SA_RESTART usage is actually very simple. I just want to know whether this mechanism is very necessary? Think it will bring hidden dangers than benefits procedures, attention to the need for programmers to code whether EINTR mistakes. I think there will be a better alternative.
It is not difficult to understand? System call can be interrupted, then the system would not be deployed for a long time before block; SA_RESTART parameters, it can also allow programmers to choose whether to allow the resumption of the automatic transfer system, which brought a lot of flexibility. ~
Call EINTR only states that the system did not complete it, will there be any problem? ? ? Come out specific? Oh, do not even done things on paper.
|
|
|
Re : Does signal system call will be interrupted?
|
|
"It is not difficult to understand? System call can be interrupted, then the system would not be deployed for a long time before block; SA_RESTART parameters, it can also allow programmers to choose whether to allow the resumption of the automatic transfer system, which brought a lot of flexibility. ~
Oh no 呵~ fact, I just suddenly worried that the proceedings in the end I ignored how many places EINTR check whether they will at some point cause harm to the overall robustness :)
|
|
|
Re : Does signal system call will be interrupted?
|
|
Sigaction signals with regard to the 31 acts with SA_RESTART, no checks EINTR! ~
|
|
|
Re : Does signal system call will be interrupted?
|
|
That has been done to check those who are not white check :) Some did not check some checks, inconsistent style is not a good habit, a unified agreement giving :) So I think this is the operating system can be improved. Better not SA_RESTART attributes, automatic RESTAKT all changed, and by the value of the corresponding module gives reasonable overtime, once overtime, back overtime wrong. Of course, this is only one thinking.
|
|
|
Re : Does signal system call will be interrupted?
|
|
In my view, the signal is Unix initial design, very unique, it can process as a means of communication, but not too demanding, it is a few decades ago things. As for the signal used in the procedure, I fall into three categories : 1. Simply ignore the signal, and under the tacit manner, for example on Covault received from the many procedures are such an option. 2. As part of the procedures required signal, but other parts of a large, unwilling to change, then use SA_RESTART signs. 3. Procedures need to use signal and received signal can affect the whole treatment process, the use of this time and can be tailored to specific circumstances or check SA_RESTART EINTR.
|
|