$(RM) $(BINS) $(TEST_BINS) flaws.txt
install:
- mkdir -p $(PREFIX)/bin
- cp -f tide $(PREFIX)/bin
+ cp -f bin/* $(PREFIX)/bin
uninstall:
rm -f $(PREFIX)/bin/tide
## STAGING
* group by hostname or group env var in registrar
-* daemonize registrar and tide executables
* Ctrl+D should not pass tag name as arg when executing tag commands
* 'Get' tag with argument currently segfaults
* registrar doesnt match open windows when new file created and is then opened for edit or line number
* Line - Get the current line number(s) containing the selection
* gap buffer does not handle UTF-8 currently
-## UNCERTAIN
-
-* refactor selection handling to avoid swapping manually (use buf_selbeg and buf_selend)
-* encode EOL setting in log entries?
-
## BACKLOG
* move mouse handlers back into tide.c
* Add matching logic for "", '', ``, and <>
* B2+B1 click executes command with selection as argument
* implement script for toggling between header and source file
+* refactor selection handling to avoid swapping manually (use buf_selbeg and buf_selend)
+* encode EOL setting in log entries?
Tags:
}
}
+int daemonize(void)
+{
+ int status;
+ /* fork into the background first */
+ if ((status = fork()) < 0)
+ return -1;
+ else if (status > 0)
+ _exit(0);
+
+ /* create a new session */
+ if (setsid() < 0) return -1;
+
+ /* fork again so we don't reattach to the terminal */
+ if ((status = fork()) < 0)
+ return -1;
+ else if (status > 0)
+ _exit(0);
+
+ /* clear any inherited umask(2) value */
+ umask(0);
+ chdir("/");
+ close(0), close(1), close(2);
+ return 0;
+}
+
int main(void) {
+ if (daemonize() != 0) return 1;
XConf x = {0};
x11_init(&x);
x11_mkwin(&x, 1, 1, PropertyChangeMask);