AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Oct 6, 2003, 09:27   #1
панаехавший
 
Obelix's Avatar
 
Join Date: Jun 2003
Location: форпост
Posts: 4,005
Rep Power: 6
Reputation: 10
Send a message via ICQ to Obelix
system() timeout

Люди мне в пхп нужно вызвать system() но при этом хочу заглушить вызов если он будет слишком долго работать.

Эни айдиаз?
__________________
Իսկ ԴՈՒ արդեն վաճառե՞լ ես Հայրենիքդ ռուսներին:

My Exchange Rate Monitor | Իմ Արտարժույթի Մոնիտորը

Obelix is offline   Reply With Quote Quote selected
Old Oct 6, 2003, 12:03   #2
¡no pasaran!
 
dolphin's Avatar
 
Join Date: Mar 2002
Location: localhost
Posts: 538
Rep Power: 7
Reputation: 23
Send a message via ICQ to dolphin
Lightbulb

popen()
__________________
[ que fors aus ne le sot riens nee ]
dolphin is offline   Reply With Quote Quote selected
Old Oct 6, 2003, 12:34   #3
панаехавший
 
Obelix's Avatar
 
Join Date: Jun 2003
Location: форпост
Posts: 4,005
Rep Power: 6
Reputation: 10
Send a message via ICQ to Obelix
Quote:
Originally posted by dolphin
popen()
В мэнуале ничего особенного не написано - просвяти плиз...
__________________
Իսկ ԴՈՒ արդեն վաճառե՞լ ես Հայրենիքդ ռուսներին:

My Exchange Rate Monitor | Իմ Արտարժույթի Մոնիտորը

Obelix is offline   Reply With Quote Quote selected
Old Oct 6, 2003, 16:05   #4
¡no pasaran!
 
dolphin's Avatar
 
Join Date: Mar 2002
Location: localhost
Posts: 538
Rep Power: 7
Reputation: 23
Send a message via ICQ to dolphin
Cool


resource popen ( string command, string mode)

Opens a pipe to a process executed by forking the command given by command.


итак, ты получаешь handle для I/O запущенного процесса и можешь продолжать работу скрипта: скажем проверять переодически время выполнения и результат (к сожалению для этих целей нельзя использовать output выполняемого процесса, т.к. функции вывода будут блокироватся при чтении. Если PHP >=4.3.0 то можно использовать stream_set_blocking(), чтобы избежать этого)
__________________
[ que fors aus ne le sot riens nee ]
dolphin is offline   Reply With Quote Quote selected
Old Oct 7, 2003, 06:31   #5
панаехавший
 
Obelix's Avatar
 
Join Date: Jun 2003
Location: форпост
Posts: 4,005
Rep Power: 6
Reputation: 10
Send a message via ICQ to Obelix
Спасибо
__________________
Իսկ ԴՈՒ արդեն վաճառե՞լ ես Հայրենիքդ ռուսներին:

My Exchange Rate Monitor | Իմ Արտարժույթի Մոնիտորը

Obelix is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:54.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link