Watchdog or other technique for GSM

I have read and re-read all of the post dealing with GSM hanging on this forum. I have made the programming changes in the library that help keep it from hanging, but after running for 2 days mine just hung again. I want to use a watchdog or similar technique to reset it if it hangs. The problem is that when I make the GSM call, it may take 30-40 seconds to make a connection, so the 8 second watchdog timer doesn't work well there. So I think I have two options that I would like opinoins on:

  1. Place a watchdog timer in the GSM library targeting the problematic code. I am not sure if it's even possible to put one in a library.

  2. Use another technique to call the GSM begin command (which is the one that hangs), but continue to monitor it from the main loop and it if doesn't return anything in say 2 minutes or so, reboot the entire device. I have read where someone was doing something similar to this, but there are no details given. Any thoughts on how this might could be pulled off?

Thank you for any help you could provide.

I have tried researching to see if there was a way to do this by forking the process, but that doesn't seem to be a viable option with this processor. Has anyone had any luck with this?