2 * This is just a little hack to copy standard input to a message in Aide>
15 void make_message(filename)
21 fp=fopen(filename,"wb"); if (fp==NULL) exit(22);
25 fprintf(fp,"Proom_aide"); putc(0,fp);
26 fprintf(fp,"T%ld",now); putc(0,fp);
27 fprintf(fp,"ACitadel"); putc(0,fp);
28 fprintf(fp,"OAide"); putc(0,fp);
29 fprintf(fp,"N%s",NODENAME); putc(0,fp);
32 while (a=getc(stdin), a>0) {
36 if (cc!=bb) fseek(fp,(-1L),1);
55 sprintf(tempbase,"ap.%d",getpid());
56 sprintf(temptmp,"/tmp/%s", tempbase);
57 sprintf(tempspool,"./network/spoolin/%s", tempbase);
58 make_message(temptmp);
60 sprintf(movecmd, "/bin/mv %s %s", temptmp, tempspool);
63 execlp("./netproc","netproc",NULL);
64 fprintf(stderr,"aidepost: could not run netproc\n");