Updating 'help' and some other related files to 0.5
authorviric@llimona
Thu, 17 Jan 2008 23:29:37 +0100
changeset 183 95d49e8a8cec
parent 182 e4c03200b149
child 184 a081c209c21b
Updating 'help' and some other related files to 0.5
Changelog
Makefile
TRICKS
main.c
tail.c
--- a/Changelog	Thu Jan 17 23:22:08 2008 +0100
+++ b/Changelog	Thu Jan 17 23:29:37 2008 +0100
@@ -10,6 +10,10 @@
 Future:
  - Use a better system than mkstemp() for finding output files, so we can add
    .gz to the gzipped outputs.
+v0.5:
+ - Several bug fixes (related to -w, -r and -L)
+ - ts creates sessions, so "kill -- -`ts -p`" can be used
+ - New implementation for '-t', which exits when finished, similar to '-w'
 v0.4.2:
  - Added labels with -L, in order to distingish commands better on queue list.
  - Added per-job information, readable through -i, configurable through TS_ENV
--- a/Makefile	Thu Jan 17 23:22:08 2008 +0100
+++ b/Makefile	Thu Jan 17 23:29:37 2008 +0100
@@ -27,6 +27,7 @@
 ts: $(OBJECTS)
 	$(CC) $(LDFLAGS) -o ts $^
 
+# Test our 'tail' implementation.
 ttail: tail.o ttail.o
 	$(CC) $(LDFLAGS) -o ttail $^
 
--- a/TRICKS	Thu Jan 17 23:22:08 2008 +0100
+++ b/TRICKS	Thu Jan 17 23:29:37 2008 +0100
@@ -36,3 +36,13 @@
 If you want a job to be executed depending on the result of any
 previous job run, you can enqueue this way:
 $ ts sh -c 'ts -w JOBID && NEWCOMMAND'
+
+
+Killing process groups
+-------------------------
+ts creates a new session for the job, so the pid of the command run can be
+used as the process group id for the command and its childs. So, you can use
+something like:
+$ kill -- -`ts -p`
+in order to kill the job started and all its childs. I find it useful when
+killing 'make's.
--- a/main.c	Thu Jan 17 23:22:08 2008 +0100
+++ b/main.c	Thu Jan 17 23:29:37 2008 +0100
@@ -295,11 +295,12 @@
 {
     printf("usage: %s [action] [-ngfmd] [-L <lab>] [cmd...]\n", cmd);
     printf("Env vars:\n");
-    printf("  TS_SOCKET  the path to the unix socket used by the ts command\n");
-    printf("  TS_MAILTO  where to mail the result (on -m). Local user by default\n");
-    printf("  TS_MAXFINISHED  maximum finished jobs in the queue\n");
-    printf("  TS_ONFINISH  binary called on job end (passing jobid, error, outfile, command)\n");
-    printf("  TS_ENV  command called on job enqueue, which output determines the job information\n");
+    printf("  TS_SOCKET  the path to the unix socket used by the ts command.\n");
+    printf("  TS_MAILTO  where to mail the result (on -m). Local user by default.\n");
+    printf("  TS_MAXFINISHED  maximum finished jobs in the queue.\n");
+    printf("  TS_ONFINISH  binary called on job end (passes jobid, error, outfile, command).\n");
+    printf("  TS_ENV  command called on enqueue. Its output determines the job information.\n");
+    printf("  TS_SAVELIST  filename which will store the list, if the server dies.\n");
     printf("Actions:\n");
     printf("  -K       kill the task spooler server\n");
     printf("  -C       clear the list of finished jobs\n");
--- a/tail.c	Thu Jan 17 23:22:08 2008 +0100
+++ b/tail.c	Thu Jan 17 23:29:37 2008 +0100
@@ -1,3 +1,9 @@
+/*
+    Task Spooler - a task queue system for the unix user
+    Copyright (C) 2007  LluĂ­s Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>
@@ -6,7 +12,6 @@
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
-#include <assert.h>
 
 #include <sys/time.h> /* Dep de main.h */