chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / sympathyd.c
1 /*
2  * sympathy.c:
3  *
4  * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
5  * All rights reserved.
6  *
7  */
8
9 static char rcsid[] = "$Id$";
10
11 /*
12  * $Log$
13  * Revision 1.3  2008/02/08 15:06:52  james
14  * *** empty log message ***
15  *
16  * Revision 1.2  2008/02/07 15:42:49  james
17  * *** empty log message ***
18  *
19  * Revision 1.1  2008/02/05 14:25:49  james
20  * *** empty log message ***
21  *
22  */
23
24 #include "sympathy.h"
25 #include "ipc.h"
26
27 #include "../src/crt.h"
28 #include "../src/vt102.h"
29
30
31 int main(int argc,char *argv[])
32 {
33 int fd;
34 struct sockaddr_un sun={0};
35
36 fd=socket(PF_UNIX,SOCK_STREAM,0);
37 if (fd<0) {
38         perror("socket");
39         exit(1);
40 }
41
42 sun.sun_family=AF_UNIX;
43 strcpy(sun.sun_path,SOCKPATH);
44
45 unlink(SOCKPATH);
46
47 if (bind(fd,(struct sockaddr *) &sun,sizeof(sun))<0)  {
48         perror("bind");
49         exit(1);
50 }
51
52 if (listen(fd,5)<0) {
53         perror("listen");
54         exit(1);
55 }
56
57
58 printf("sizeof(VT102)=%d\n",sizeof(VT102));
59
60 }