Back to index

courier  0.68.2
Functions
cancelmsg.c File Reference
#include "courier.h"
#include "comqueuename.h"
#include "commsgcancel.h"
#include "comctlfile.h"
#include "comparseqid.h"
#include <sys/types.h>
#include <sys/uio.h>
#include <string.h>
#include <signal.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 35 of file cancelmsg.c.

{
const  char *qid;

       if (chdir(courierdir()))
       {
              perror("chdir");
              return (1);
       }
       if (argc < 2) return (0);

       qid=argv[1];
       if (msgcancel(qid, (const char **)argv+2, argc-2, 1))
       {
              fprintf(stderr, "Message not found.\n");
              exit(1);
       }
       printf("Message scheduled for cancellation.\n");
       return (0);
}

Here is the call graph for this function: