清单2给出了一种注册信号处理程序的方法。
这将导致第三个问题:为信号处理程序接收信号的程序调用已包装的调用。
This led to a third problem: Programs that take signals for which the signal handlers invoke wrapped calls.
清单8中的代码实现了一个处理传入的SIGCHLD信号的信号处理程序。
The code in Listing 8 implements a signal handler to deal with the incoming SIGCHLD signal.
在视图中,您需要使用define_signal方法定义信号处理程序。
In the view, you need to define signal handlers using the define_signal method. It takes a hash defining a signal name and a view method to handle that signal.
为了获得理想的核心文件,可能需要通过设置环境变量来禁用MQ的那些信号处理程序。
To get a good core file, MQ might need to disable those signal handlers by setting the environment variables.
在软件设计部分,设计包括陀螺稳定程序、传感器信号处理程序和串口通信程序。
In the software design part, the design includes a gyro stabilization program, the sensor signal processing program, and serial communication program.
程序中的信号处理程序捕获到函数的执行被某个信号中断,信号处理程序然后按正常方式返回。
EINTR — the function was interrupted by a signal, which was caught by a signal handler in the program, and the signal handler returned normally.
由于使用了sigset函数(它向信号处理程序分配一个函数指针),清单8比前一个示例稍微复杂一点,。
Listing 8 is slightly more complex than the previous example because of the sigset function, which assigns a function pointer to a signal handler.
第一种方式是为SIGBUS信号设置信号处理程序,并在处理程序中简单的执行return语句。
The first way is to install a signal handler for the SIGBUS signal, and then simply call return in the handler.
这可以通过在信号处理程序代码中设置一个全局标志并在完成关键部分的代码之后检查这个标志来实现。
This can be achieved by setting a global flag in the handler code and checking for the flag after completion of the critical part.
未禁用信号处理程序时,进程在“当前”状态中可能表现为正在进行信号处理,从而可能隐藏了真正问题。
When the signal handler doesn't disable, the process might show up in the "current" status as signal handling, which might hide the real problem.
通常,信号处理程序将会返回,并进入上次离开时ioctl的位置处,这样SPU程序就可以继续执行了。
Normally, the signal handler will return and cause the ioctl to be entered at exactly the point where it was left so the SPU program can continue.
基于某重点工程项目,介绍了一种高速数据并行处理系统,并详细说明了DS P中信号处理程序的操作流程。
Based on one key project, a high-speed digital parallel analyzing system is introduced. The flow of operation of the signal processing program in DSP is defined in detail.
然后使用值18 (SIGCHLD)来调用信号处理程序,确认子进程的退出,并且父进程返回到sleep (60)。
The signal handler is called with a value of 18 (SIGCHLD), the child's exit is acknowledged, and the parent goes back to its sleep (60).
如果您过去曾经编写过事件驱动的程序,那么我认为您会发现,对于设置显式事件处理循环这一常见做法,使用信号是一个令人耳目一新的变化。
If you've ever done any event-driven programming in the past, I think you'll find signals to be a refreshing change from the common practice of setting up an explicit event processing loop.
用户进程不允许为所有信号安装处理程序;例如,不允许为SIGKILL和SIGSTOP 安装处理程序。
The user process is not allowed to install handlers for all signals; for instance, installing handlers for SIGKILL and SIGSTOP are not permitted.
有不同的信号量类:区分优先级,随着程序大小的增长根据活动进行特殊处理(例如,fifo次序,使用多个读进程)。
Have different kinds of semaphore classes: prioritization, specialization based on activity (for example, FIFO ordering, taking advantage of multiple readers) as the program increases in size.
procsig输出进程的信号操作和处理程序。
另一个名为Streamit的项目对数码信号处理中的平行程序进行了开发。
Another project, called StreamIt, exploits the parallelism inherent in much digital signal processing.
在信号处理应用程序中,如果恢复信号需要乘上一个“满”的矩阵,那么带状矩阵提供的所有的速度优势都将不复存在。
In a signal-processing application, all the speed advantages offered by banded matrices would be lost if restoring the signal required multiplying it by a full matrix.
不过,如果您知道当信号可能到达时,程序不可能使用处理器那个时刻所使用的流,那么就是安全的。
However, if you know that the program cannot possibly use the stream that the handler USES at a time when signals can arrive, you are safe.
程序可以注册处理各种类型的信号,但是信号可能会在最不合适的时候出现,包括您正在处理另一个信号的时候。
Programs can register to handle various kinds of signals, but signals can happen at the most inopportune times, including while you're already handling another signal.
在这个想象期间,大脑之门把那一百个神经细胞的电活动传送给一个处理信号的程序,这个软件将探测信号的规律。
During this imaginative period the BrainGate fed the electrical activity of its century of nerve cells to a piece of signal-processing software that looked for patterns.
您务必要知道自己的应用程序是否有信号处理以及如何禁用它们以生成核心文件。
It is important that you know if your application has signal handling, and how to disable them to generate a core file.
两个信号处理器被连接起来——一个用来在用户关闭窗口时退出应用程序,另一个用来在用户点击按钮时,修改显示的欢迎信息。
Two signal handlers are connected — one to quit the application when the user closes the window and another to change the greeting that is displayed when the user clicks the button.
信号处理器的消息和程序的数据都会被破坏,因为两个调用操作了同一数据结构:流本身。
Both the signal handler's message and the program's data could be corrupted, because both calls operate on the same data structure: the stream itself.
然后主循环查询自己的信号和处理程序之间的内部映射表,也叫做回调,并调用注册到指定对象的指定信号的处理程序。
The main loop then looks through its internal mapping table between its signals and handlers, also called callbacks, and calls the handlers registered for the given signal on the given object.
RTSJ包含了对异步事件处理的支持,触发异步事件的事件包括大量包含计时器的源代码、操作系统信号、超过时限和其他应用程序定义的事件。
The RTSJ includes support for handling asynchronous events triggered by a number of sources including timers, operating-system signals, missed deadlines, and other application-defined events.
设置 override_signal_handling 可以确保该程序终止并进行核心转储,即使应用程序已经对这些信号进行了处理。
Setting override_signal_handling ensures that the program terminates and core, even if these signals have been handled by the application.
假定信号处理器使用fprintf打印一条消息,而当信号发出时程序正在使用同一个流进行fprintf调用。
Suppose the signal handler prints a message with fprintf and the program was in the middle of an fprintf call using the same stream when the signal was delivered.
应用推荐