Re: How to notify application?

Steven Scholz <[email protected]> Wed, 13 Nov 2002 11:10:12 +0100
Newsgroups gmane.linux.pcmcia.devel
Message-ID <[email protected]>
Hi Dave,

thanks for you reply.


dhinds wrote:

> > Is there a nice way of notifying a random application of card
> > insertion/removal events?
> 
> If you want to monitor all such events, the application can use the
> same ioctl based API used by the cardmgr and cardinfo programs.  The
> API is documented in the Programmer's Guide.  Depending on the type of
> interaction required, if you are only interested in events for certain
> card types, you can also modify the scripts in /etc/pcmcia that are
> invoked by cardmgr in response to card status change events.

That sounds good.

So I could send a signal from within the scripts to my application!?
Maybe using " kill -s SIGUSR1 `pidof myapp` " in the start/stop section of the
ide script...

So my app gets the signal everytime "ide start" or "ide stop" gets called...

Is it ok to assume that "cardctl eject" will have the same effect as an card
removal interrupt? 

Thanks,

Steven


-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about 
your web server security? Click here for a FREE Thawte 
Apache SSL Guide and answer your Apache SSL security 
needs: http://www.gothawte.com/rd523.html