martanne/abduco — pull request #1 by phillid (2014-12-22 01:23:11+00:00)
Title: Add new command line option to collect exit status and create a new session

I often use abduco to detach a wvdial session. When I pull out the modem, it exits, and I'd like to reconnect, I used to reach for a `dtach -c dial wvdial`, so now I go for an `abduco -c dial wvdial`, but I'm told the address is already in use. I've started to remember to re-attach the session before creating a new one, but there is no reason the computer can't remember to do this for me.

As such, in this pull request, I have added a new command line option, `-C`, with the same syntax as `-c`. It acts just like `-c`, except that if the session currently exists and has already exited, it will attach the session in order to report the exit status. It will then create a new session, just like `-c` does. If the session exists and hasn't yet exited, this fact is stated.