What are and how do signs work?

14

Do they exist only on * Unix or also on Windows? If so, what would be the equivalent on the Windows system?

  • What is the relationship with signal handling ?
  • A practical example of a signal handling can be any language just to demonstrate the concept.
  • In which cases is it recommended to work with signals in programming?
asked by anonymous 21.12.2018 / 14:54

1 answer

10

Signs, so open, can be a lot, even in computing, it seems to be even talking about the term used in OS signaling. But it does exist in hardware (although it usually calls interrupt), or in specific concepts or technologies on another level . I do not know if the difference between each term is so clear.

Do you know events ? Event is an abstraction at a level just above the signage. So a signal is an information that is passed to an algorithm, usually interrupting the normal execution in some way to process something that the signer defines what to do.

Linux does this whenever it needs to inform an application that something of its interest has happened and it must process it. In general you can choose what to process, and it is common to need to respond that you did something, or that it will not, or that the signal emitter should continue in some specific way. Linux may not be the initial sender, but it coordinates the signaling, but another application may drop the signal.

Windows has a very similar mechanism, but it does not call it signaling. And of course, the details are different. There are those who like it one way or the other.

I do not usually do low level programming in Linux so I can not give too many details, but I know that in a future project I will have to stay sharp on it if I get out of the role :) I use a little more abstract mechanism in level languages higher. I've done some things in Windows and the signaling occurs through a callback usually called < a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx"> WindowProc() ( tutorial ).

Maybe even for some compatibility Windows is capable of processing signals equal to of Linux , but I do not know the context well. Read more .

Usage always comes from the need to indicate to some application, or part of one, that something has happened and needs a position to do.

A list of signs .

Do not take this as a canonical response.

    
21.12.2018 / 15:55