I read some code, it calls hunt() function of开发者_如何学运维 OSE(Operating System Embedded), anyone knows what is the propouse of this function?
can anyone help me on this?
According to this document Porting OSE Systems to Linux(PDF), hunt()
is used to obtain a process ID from a process name for later use in sending signals, etc.
Quote from same, page 7:
When a process is started in OSE it has to have a name assigned to it. This name is a simple (human readable) text string that can then be used by other processes that wants to communicate with the process. The name is sent to the hunt() call which is used to obtain the ID of the process. The ID can then be used as an address to send signals to.
see also the sample implementation of send_sig
based on same on page 8.
精彩评论