char *configfile;
char *replyto;
int bash;
+ int background;
int interactive;
int shrink_urls;
int dry_run;
fprintf(stdout, " --shrink-urls\n");
fprintf(stdout, " --page PAGENUMBER\n");
fprintf(stdout, " --bash\n");
+ fprintf(stdout, " --background\n");
fprintf(stdout, " --debug\n");
fprintf(stdout, " --verbose\n");
fprintf(stdout, " --dry-run\n");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl_buf);
if (!session->dry_run) {
res = curl_easy_perform(curl);
- if (res && !session->bash) {
+ if (res && !session->background) {
fprintf(stderr, "error(%d) trying to perform "
"operation\n", res);
return -EINVAL;
{ "shrink-urls", 0, NULL, 's' },
{ "help", 0, NULL, 'h' },
{ "bash", 0, NULL, 'b' },
+ { "background", 0, NULL, 'B' },
{ "dry-run", 0, NULL, 'n' },
{ "page", 1, NULL, 'g' },
{ "version", 0, NULL, 'v' },
break;
case 'b':
session->bash = 1;
+ /* fall-through intended */
+ case 'B':
+ session->background = 1;
break;
case 'c':
if (session->configfile)
}
if (session->action == ACTION_UPDATE) {
- if (session->bash || !session->interactive)
+ if (session->background || !session->interactive)
tweet = get_string_from_stdin();
else
tweet = session->readline("tweet: ");
/* fork ourself so that the main shell can get on
* with it's life as we try to connect and handle everything
*/
- if (session->bash) {
+ if (session->background) {
child = fork();
if (child) {
dbg("child is %d\n", child);
}
retval = send_request(session);
- if (retval && !session->bash)
+ if (retval && !session->background)
fprintf(stderr, "operation failed\n");
log_session(session, retval);
help specify it is coming from a command line. Don't put the
working directory and the '$' in the tweet message.
</para>
+
+ <para>
+ This option implies <option>--background</option>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--background</option></term>
+ <listitem>
<para>
- This mode also does not report back any errors that might have
- happened when sending the message, and it sends it in the
- background, returning immediately, allowing the process to
- continue on.
+ Do not report back any errors that might have
+ happened when sending the message, and send it in the
+ background, returning immediately, allowing the user
+ to continue on.
</para>
</listitem>
</varlistentry>