[62] in Pthreads mailing list archive
popen & pclose
daemon@ATHENA.MIT.EDU (David Bigagli)
Mon Aug 7 08:33:35 1995
Date: Mon, 7 Aug 1995 14:02:46 +0200
From: David Bigagli <david@naxos.caspur.it>
To: pthreads@MIT.EDU
Cc: david@naxos.caspur.it
Hi,
I have a problem with this simple code:
ff = popen("/usr/lib/sendmail -oi -t","w");
if(ff == NULL)
printf("null pipe %d\n",errno);
if(ff != NULL){
fprintf(ff,"\
From: csw client\n\
To: david\n\
blablabla\n);
}
pclose(ff);
1)
when I'm using it inside a thread after popen I have two
processes as I can see using getpid() and both are waiting
on pclose(ff).
2)
If I only include and link this program with pthreads without
using any thread the programs stops and wait on pclose(ff).
Any idea??
Thanks David