0
@Laxmidhar Sahoo
Sir, Here i need some perameter in C which can check whether my exe file(http server) running or not and with its feedback,if not ruuning then it will agian start my exe file(http server). Do you know any command in C like DOS which can check and restart exe when it is stop.??
see this one here in DOS we can check process is runing or not if ruuing then error=0 so it will jump to line loop(last line) and if not ruuing then it will jump to next line run that exe then agin go to loop(1st line) for further checking.
:loop
tasklist /FI "IMAGENAME eq httpserver.exe" 2>NUL | find /I /V "httpserver.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
httpserver.exe hostipaddress command
goto loop
Thank you
(I WANT TO DO THIS IN C Sir CAN YOU??)