F
FBert
Hi,
I´m opening stdin to get a file and pass it through a pipe.
razor=popen("/var/qmail/bin/razor-check -home=/var/qmail/razor",
"w");
while((ret=fread(linha,1,sizeof(linha),stdin))>0)
{fwrite(linha,1,sizeof(linha),razor);}
pclose(razor);
After that, if razor returns me an error I want to send an email with
the original message attached...but how can I re-read stdin to do
that.
I do not want to save the message to a temp file or save it to memory
for i/o questions. Is there a way to re-read stdin ?
I´m opening stdin to get a file and pass it through a pipe.
razor=popen("/var/qmail/bin/razor-check -home=/var/qmail/razor",
"w");
while((ret=fread(linha,1,sizeof(linha),stdin))>0)
{fwrite(linha,1,sizeof(linha),razor);}
pclose(razor);
After that, if razor returns me an error I want to send an email with
the original message attached...but how can I re-read stdin to do
that.
I do not want to save the message to a temp file or save it to memory
for i/o questions. Is there a way to re-read stdin ?