App that connects to Arduino via USB automatically

I've just started looking into using an Arduino to show the status of a server by simply lighting an LED. So the main logic needs to be on the computer. Obviously the Arduino app will connect to the Arduino board, but is there a C library or something that I can use to create a custom app that will sense when the Arduino is plugged in and talk to it that way? I'm on Mac OS X. I'm pretty sure this is possible but I'm pretty swamped with all the documentation and I'm not even sure what search terms to use to find documentation on this.

To be specific, I'm hoping that I can have a daemon on the computer, it will sense when the Arduino is plugged in, and when it is plugged in, it will tell it to turn on/off an LED. Maybe in the future I'll add a button to the Arduino to tell the computer something, but for now I'll start with just the LED.

I'd think you would write and run an application on the mac that would send something to the arduino via the serial port every so often and see if the arduino responds.

I have been looking for this very thing, but for PHP not C.(there is php_serial, but it is based upon PHP4, and not sure how hard to change it to do USB) I know you could do it with python using pyserial, but you would have to write your own script. I am doing it very similar to how zoomkat described, but for PHP. Might be fairly simple to rewrite a few lines for PHP-CLI and use cron, or use wget to access the PHP version. Not done with it yet, though; working out a few bugs.

You may need to verify that PHP keeps the serial port open all the time for communication, or defeat the auto reset on the arduino when the serial port is opened via the USB connection.

So I've been thinking and here is a new description of my requirements. I want the Arduino to have several LED's showing status. One will indicate it is communicating with the computer. The others will be dependent on what the computer says. The computer app/script will determine if it can talk to the Arduino and if not send some sort of notification (email/syslog message).

The exact usage is that I have some computers that control a classroom recording system (podcast producer) and I want users of the room to be able to see when the computer is recording and when it isn't. Eventually it would be cool to start and stopp the recording by pushing a button. Because the device is going to be in a classroom, I need it to be able to connect to the headless computer that controls and records the camera and give user feedback that it is communicating. That is, I want it to show a light that things are working, and on the computer, I want it to notify the administrators if the arduino is unresponsive.

Concerning the arduino, you probably need to start experimenting with serial communications, pin I/O, and the blink examples to see what you can do.

Thanks zoomkat, I'll start looking into those topics.