Re: popen: how to test for end of program



bastiaannaber@xxxxxxxxx wrote:
>
> I am trying to write a program which uses popen but I have a problem. I
> want to detect if the program I call with popen has ended. For example:
>
> #include <stdio.h>
> #include <sys/types.h>
> #include <unistd.h>
>
.... snip ...
>
> Does anyone know how to test if the program has ended ?

Since nothing you mention, apart from <stdio.h>, exists in the
portable standard C language, the answer is NO, nobody here knows.
However, if you were to move to a newsgroup where those things are
topical, possibly with unix in its name, the answer might be
different.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

.



Relevant Pages

  • Re: Msgbox
    ... >> And if there were an Access for Unix, I think it would be the same as ... >> vbCr there, too. ... (please reply to the newsgroup) ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • Re: [OT] Solaris crashes itself when /tmp is full
    ... >>Last time I looked comp.os.vms wasn't a Solaris admin newsgroup. ... tirade to deflect criticism from the then owners of OpenVMS. ... Rob could apologise and agree to stop spouting the same kind of BS ... The UNIX cluster BS ...
    (comp.os.vms)
  • Welcome to comp.unix.questions [Frequent posting]
    ... potential posters about what is appropriate for this newsgroup. ... The name under which a FAQ is archived appears in the "Archive-Name:" ... those articles before posting a question to the net. ... knowledgeable Unix wizards read that group and will be able to help you. ...
    (comp.unix.questions)
  • Welcome to comp.unix.questions [Frequent posting]
    ... potential posters about what is appropriate for this newsgroup. ... The name under which a FAQ is archived appears in the "Archive-Name:" ... those articles before posting a question to the net. ... knowledgeable Unix wizards read that group and will be able to help you. ...
    (comp.unix.questions)
  • Welcome to comp.unix.questions [Frequent posting]
    ... potential posters about what is appropriate for this newsgroup. ... The name under which a FAQ is archived appears in the "Archive-Name:" ... those articles before posting a question to the net. ... knowledgeable Unix wizards read that group and will be able to help you. ...
    (comp.unix.questions)