Sponsored Content
Full Discussion: Detecting interruptions in C
Top Forums Programming Detecting interruptions in C Post 302149570 by porter on Thursday 6th of December 2007 03:13:40 PM
Old 12-06-2007
With what operating system, environment, hardware etc?

If you are talking about DOS, just stick in a simple TSR with redirector, if you are talking about a more complex OS it's a driver responsibility.

Out of interest, why, as a program, would you care whether a disk access has occurred?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

detecting drives

I know that Unix is different from windows in that it needs more manual configuring but how do I get Solaris 8 (Intel version) to recognize my floppy drive and cd-rom?? I mean does it automatically detect the drives at startup and I have to mount them or do I have to create the drives somehow and... (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Programming

Detecting a key combination

Could anybody tell me how I can detect a particular key combination and perform a particular task on that event. e.g. if I press Ctrl + L on the shell then it clears the screen. Please tell me how it can be performed on my shell. And how the Arrow Keys can be detected. I tried but pressing a key... (11 Replies)
Discussion started by: mobile01
11 Replies

3. UNIX for Dummies Questions & Answers

Detecting Second disk

Hello all, first of all, I apologise if I may ask stupid or obvious questions, but I'm new to UNIX and I think I need a little bit of help before I start gearing up :) Anyway, I have installed a Solaris 8 on a Sun machine, and it has 2 physical disks in it. However, it seems that it is only... (7 Replies)
Discussion started by: dragunu
7 Replies

4. Shell Programming and Scripting

Detecting Vmware on Linux

Hi, I need help to detect Vmware on Linux and SunOS. I need to know if Vmware is installed on the box. If yes then if it is a physical or a virtual machine. Thanks in advance, amittal (2 Replies)
Discussion started by: amittal
2 Replies

5. Shell Programming and Scripting

detecting multiple instances

Hi Gurus I have a requirement like this. i use solaris OS.. if there are 2 instances of the same ksh file running in the directory, i need to kill the ksh file that started to run latest. suppose ragha.ksh starts running thru cron in abc/xyz directory now ragha.ksh started running by any... (3 Replies)
Discussion started by: ragha81
3 Replies

6. SCO

lan card not detecting

hi all i have installed SCO 5.0.5 on a "Netfinity 5000" IBM server. But the OS is not detecting the lan card. how can i detect it.... help and thanks in advance . bidhayak (3 Replies)
Discussion started by: bidhayakm
3 Replies

7. Solaris

Detecting Harddrive Errors

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

8. UNIX for Dummies Questions & Answers

detecting consecutive filenames

I have a series of filenames of the format junk_x_###.txt where x and ### are numbers. I need to detect when at least 30 consecutive files (e.g. junk_1_001.txt, junk_1_002.txt.....) are in the directory. There are sets of files with similar names that need to be grouped together and counted... (0 Replies)
Discussion started by: stanleymacc
0 Replies

9. UNIX for Advanced & Expert Users

detecting the running services

I did search on the subject on services in linux and they do explain how to find what are the services that loaded when the linux boot. however I have not find how to detect what services run right now. I would like to now that and how to kill services. Thanks. (3 Replies)
Discussion started by: programAngel
3 Replies

10. Shell Programming and Scripting

need help in detecting errors

Hi All , I need a script to find errors in a particular and in a particular path Actually in my logs i`ve so many kinds of errors(i can even say as 100 types also).if i run the script i need to know the error (some errors can aviod ) so finally the script o/p should be a numeric... (3 Replies)
Discussion started by: radha254
3 Replies
POE::Wheel::Curses(3pm) 				User Contributed Perl Documentation				   POE::Wheel::Curses(3pm)

NAME
POE::Wheel::Curses - non-blocking input for Curses SYNOPSIS
use Curses; use POE qw(Wheel::Curses); POE::Session->create( inline_states => { _start => sub { $_[HEAP]{console} = POE::Wheel::Curses->new( InputEvent => 'got_keystroke', ); }, got_keystroke => sub { my $keystroke = $_[ARG0]; # Make control and extended keystrokes printable. if ($keystroke lt ' ') { $keystroke = '<' . uc(unctrl($keystroke)) . '>'; } elsif ($keystroke =~ /^d{2,}$/) { $keystroke = '<' . uc(keyname($keystroke)) . '>'; } # Just display it. addstr($keystroke); noutrefresh(); doupdate; # Gotta exit somehow. delete $_[HEAP]{console} if $keystroke eq "<^C>"; }, } ); POE::Kernel->run(); exit; DESCRIPTION
POE::Wheel::Curses implements non-blocking input for Curses programs. POE::Wheel::Curses will emit an "InputEvent" of your choosing whenever an input event is registered on a recognized input device (keyboard and sometimes mouse, depending on the curses library). Meanwhile, applications can be doing other things like monitoring network connections or child processes, or managing timers and stuff. PUBLIC METHODS
POE::Wheel::Curses is rather simple. new new() creates a new POE::Wheel::Curses object. During construction, the wheel registers an input watcher for STDIN (via select_read()) and registers an internal handler to preprocess keystrokes. new() accepts only one parameter "InputEvent". "InputEvent" contains the name of the event that the wheel will emit whenever there is input on the console or terminal. As with all wheels, the event will be sent to the session that was active when the wheel was constructed. It should be noted that an application may only have one active POE::Wheel::Curses object. EVENTS AND PARAMETERS
These are the events sent by POE::Wheel::Curses. InputEvent "InputEvent" defines the event that will be emitted when POE::Wheel::Curses detects and reads console input. This event includes two parameters: $_[ARG0] contains the raw keystroke as received by Curses::getch(). An application may process the keystroke using Curses::unctrl() and Curses::keyname() on the keystroke. $_[ARG1] contains the POE::Wheel::Curses object's ID. Mouse events aren't portable. As of October 2009, it's up to the application to decide whether to call mousemask(). SEE ALSO
Curses documents what can be done with Curses. Also see the man page for whichever version of libcurses happens to be installed (curses, ncurses, etc.). POE::Wheel describes wheels in general. The SEE ALSO section in POE contains a table of contents covering the entire POE distribution. BUGS
None known, although curses implementations vary widely. AUTHORS &; COPYRIGHTS Please see POE for more information about authors and contributors. perl v5.14.2 2012-05-15 POE::Wheel::Curses(3pm)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy