int i; int pvect[2]; char buf[MAXLINE];
int pvect[2], i;
sendmessage(char *myname){	FILE *mfp, *sfp;	int i;	int pvect[2];	char buf[MAXLINE];	mfp = fopen(VMSG, "r");	if (mfp == NULL) {		syslog(LOG_NOTICE, "no ~%s/%s file.", myname, VMSG);		exit(1);	}	if (pipe(pvect) < 0) {		syslog(LOG_ERR, "pipe: %m");		exit(1);	}	i = vfork();	if (i < 0) {		syslog(LOG_ERR, "fork: %m");		exit(1);	}	if (i == 0) {		dup2(pvect[0], 0);		close(pvect[0]);		close(pvect[1]);		close(fileno(mfp));		execl(_PATH_SENDMAIL, "sendmail", "-f", myname, "--",		    from, (char *)NULL);		syslog(LOG_ERR, "can't exec %s: %m", _PATH_SENDMAIL);		_exit(1);	}	close(pvect[0]);	sfp = fdopen(pvect[1], "w");	fprintf(sfp, "To: %s\n", from);	while (fgets(buf, sizeof buf, mfp)) {		char *s = strstr(buf, "$SUBJECT");		if ( s ) {			*s = 0;			fputs(buf, sfp);			fputs(subj, sfp);			fputs(s+8, sfp);		} else {			fputs(buf, sfp);		}	}	fclose(mfp);	fclose(sfp);}