LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 02-17-2011, 03:42 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 112

Rep: Reputation: 15
Why does Ctrl+C causes module release ?


Hello,

I'm using vanilla 2.6.27.35 on a Core2Duo CPU.

The CPU access customized hardware via PCI using a very simple device driver and a user level driver I wrote.

The application waits for a PCI interrupt received in the device driver and then writes data to the hardware. This process goes forever.

When I press Ctrl+C I see that the release part of the device driver is called.

What is the reason for this ? I expect only the application to stop.

Thanks.
 
Old 02-18-2011, 03:54 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,300
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by zvivered View Post
When I press Ctrl+C I see that the release part of the device driver is called.
What is the reason for this ? I expect only the application to stop.
It could be that the operating system is cleaning up after you and closing the file handle to the device driver:
Quote:
Originally Posted by "Essential Linux Device Drivers", Sreekrishnan Venkateswaran, p. 127
The kernel calls the release() method when an application closes an open device.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable Ctrl+C, Ctrl+V, Ctrl+X in rdesktop? Aswathy Linux - Newbie 1 01-19-2011 06:22 PM
[SOLVED] vim:ctrl+v command to select some data.But when I push ctrl+v.It doesn't work.. e3399 Linux - Newbie 20 12-07-2010 06:21 AM
Recognizing ctrl+c,ctrl+l,ctrl+d in C programs leonardo6023 Programming 1 08-19-2009 09:23 AM
KDE 3.5.9 - Konqueror - keyboard shortcuts ctrl+, and ctrl+. sometimes stop working bhy Linux - Desktop 1 07-26-2008 11:48 AM
Any way to create bash short cuts (like CTRL+l for clear and Ctrl+D for exit) supersubu123 Linux - General 5 05-30-2007 03:02 AM


All times are GMT -5. The time now is 10:58 PM.

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