if --bash is enabled, fork and handle the send in the background
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 May 2008 03:39:10 +0000 (20:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 May 2008 03:39:10 +0000 (20:39 -0700)
otherwise, wait for it to happen.

bti.c

diff --git a/bti.c b/bti.c
index 5921e3d..5a139ea 100644 (file)
--- a/bti.c
+++ b/bti.c
@@ -401,10 +401,12 @@ int main(int argc, char *argv[], char *envp[])
        /* fork ourself so that the main shell can get on
         * with it's life as we try to connect and handle everything
         */
-       child = fork();
-       if (child) {
-               dbg("child is %d\n", child);
-               exit(0);
+       if (session->bash) {
+               child = fork();
+                       if (child) {
+                       dbg("child is %d\n", child);
+                       exit(0);
+               }
        }
 
        retval = send_tweet(session);