Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-09-2005, 02:14 PM   #1
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
(linux) handler

I am constantly finding the "handler" keyword in the linux source. I thought it had only to do with interrupts (interrupt handlers,etc), however i see it in other forms,too; for example "Call the commit handler in the driver". Is "handler" a more general naming convention? To what does it usually refer to? So far i have understood, that it generally refers to functions, which finish certain jobs. If you can point me to any links ...

Last edited by kpachopoulos; 11-09-2005 at 02:17 PM.
Old 11-09-2005, 02:28 PM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
I have never seen "handler" refer to anything except a function that's called to, well, handle something. Usually an event or signal that's called asynchronously.
Old 11-10-2005, 04:12 AM   #3
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
In c++ terminology (can also be in c) , a handler (also called an exception handler) is a piece of code that manages program events : it catches the event and reacts to it.
Similarly (as being said) you can also have signal handlers. You tell your program that whenever a signal appears, it has to be treated by sig_handler. Then all the error/signal/events/.. are handled in the same function.
The same applies for an interrupt, as yous said. When an interrupt is raised, the handler deals with it, does the action and returns.

A handler can also be an overclass. Rather than using directly a door, you will use the handle to open the door. In that way a handler can also be a helper and this helper can be reused for other objects ( a trunk, a window,..) , it centralizes the entry for an action.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 03:17 PM
Linux Interrupt Handler lucky6969b Linux - Software 1 12-01-2005 12:55 PM
Custom Timer Interrupt Handler Linux 2.4x ratwings Linux - Software 2 01-13-2005 02:51 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 10:47 AM
File Handler Limitations in Linux? m3kgt Linux - General 2 01-09-2004 02:08 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration