static int cmd_start(int argc, char *argv[]) {
int i, j;
char *c;
+
+ argc += optind;
+ argv -= optind;
char *slash = strrchr(argv[0], '/');
#ifdef HAVE_MINGW
return 1;
}
+ // Silently try notifying a running tincd of changes.
+ fclose(stderr);
+
+ if(connect_tincd())
+ sendline(fd, "%d %d", CONTROL, REQ_RELOAD);
+
return 0;
}
char *command;
xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
- return system(command);
+ int result = system(command);
+ if(result)
+ return result;
+
+ // Silently try notifying a running tincd of changes.
+ fclose(stderr);
+
+ if(connect_tincd())
+ sendline(fd, "%d %d", CONTROL, REQ_RELOAD);
+
+ return 0;
}
static const struct {