Subversion Repositories MLServ

Rev

Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 nishi 1
/* $Id: newlist.c 10 2024-09-25 01:20:43Z nishi $ */
2
 
3
#include "ms_newlist.h"
4
 
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <string.h>
10 nishi 8
#include <unistd.h>
4 nishi 9
 
10
#include <cm_ipc.h>
11
 
12
int ms_handle_newlist(int argc, char** argv, int start) {
13
	int i;
14
	if(argc - start != 2) {
15
		fprintf(stderr, "Usage: newlist name description\n");
16
		return 1;
17
	}
18
	char* name = argv[start];
19
	char* description = argv[start + 1];
20
	int sock = cm_ipc_connect();
21
	if(sock < 0) {
22
		fprintf(stderr, "IPC connection failure\n");
23
		return 1;
24
	}
10 nishi 25
	close(sock);
4 nishi 26
	return 0;
27
}