Reply to Re: How to stop program?

Your name:

Reply:


Posted by Malcolm Dew-Jones on 05/20/05 20:33

shyren (salilm2000@yahoo.com) wrote:
: Hi All,
: I have a php program which calls a c++ program using exec. However when
: user presses stop button in the browser or closes it this program keeps
: on running on the server. How can I stop it according to user's
: actions.
: Thanks in advance.
: Sal

If the c++ program is sending data to the file handle that is going back
to the browser (normally stdout), then the c++ program _might_ receive an
error when it prints to stdout if the browser is stopped, depending on how
the web server works.

If a web server detected that the file handle to the browser was closed
then I suppose some web servers might signal the cgi. The script and its
children could arrange to be interupted by that.

I would experiment with those two things on the server in question to see
if your program can detect either one.

Both cases depend on the browser closing the socket when you hit the stop
button, which is not something you control.

--

This space not for rent.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация