Wireless C program conncection interruption problem

Dear Gurus

My company has a wireless handheld C program as text-mode workstations in remote sites. We suspected that the program get interrupted sometimes because of out-of-wireless access and hence resulted in db record locking and other issue. It did trouble us a lot.

Is it possible to use fork() and signal() to detect Hangup or Interrupt so as to kill the process automatically? However, I wondered whether wirless connection interruption would not pose SIGINT or SIGHUP to the process, right? Or, any other ways to tackle the problem (a small program example)?

Thank you

Dummy

One of the things you can try is to use non-blocking mode on the call that's being used for wireless access. This way the program doesn't wait but exits out.

I would use alarm mechanism, if applicable. It saved me lots of grief over unstable connections.