2 * This is just a little hack to copy standard input to a message in Aide>
15 void make_message(char *filename)
22 fp=fopen(filename,"wb"); if (fp==NULL) exit(22);
26 fprintf(fp,"Proom_aide"); putc(0,fp);
27 fprintf(fp,"T%ld",now); putc(0,fp);
28 fprintf(fp,"ACitadel"); putc(0,fp);
29 fprintf(fp,"OAide"); putc(0,fp);
30 fprintf(fp,"N%s",NODENAME); putc(0,fp);
33 while (a=getc(stdin), a>0) {
37 if (cc!=bb) fseek(fp,(-1L),1);
46 int main(int argc, char **argv)
54 snprintf(tempbase, sizeof tempbase,"ap.%d", getpid());
55 snprintf(temptmp, sizeof temptmp,"/tmp/%s", tempbase);
56 snprintf(tempspool,sizeof tempspool,"./network/spoolin/%s", tempbase);
57 make_message(temptmp);
59 snprintf(movecmd, sizeof movecmd, "/bin/mv %s %s", temptmp, tempspool);
62 execlp("./netproc", "netproc", "-i", NULL);
63 fprintf(stderr,"aidepost: could not run netproc\n");