aboutsummaryrefslogtreecommitdiffstats
path: root/src/satrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/satrm.c')
-rw-r--r--src/satrm.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/satrm.c b/src/satrm.c
index fda6288..115373c 100644
--- a/src/satrm.c
+++ b/src/satrm.c
@@ -19,7 +19,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include "client.h"
+#include "daemon.h"
@@ -42,15 +42,14 @@ USAGE("JOB-ID...")
int
main(int argc, char *argv[])
{
- size_t n;
- char *msg = NULL;
+ PROLOGUE(argc >= 2, O_RDWR, NULL);
+ NO_OPTIONS;
- if (argc > 0) argv0 = argv[0];
- if (argc < 2) usage();
+ for (argv++; *argv; argv++)
+ t (remove_job(*argv, 0) && errno);
+ t (poke_daemon());
- NO_OPTIONS;
- CONSTRUCT_MESSAGE;
- SEND(SAT_REMOVE, n, msg);
- END(msg);
+ CLEANUP_START;
+ CLEANUP_END;
}