[En-Nut-Discussion] Question about CGI
Ole Reinhardt
ole.reinhardt at kernelconcepts.de
Tue Aug 22 16:44:31 CEST 2006
Hi,
> Yes this might be the cause, but how can I check if the file (stream)
> descriptor is still valid ?
You simply should check the return values of every function that support
return values (like fputc).
> I tried also to hit "stop" button of my browser before file transfer
> finishes. In such situation my function still writes to the stream but
> there is no restart - write() simply returns some error code, my cgi
> function returns and everything is ok.
Ok. So the closed file descriptors does not seem to be a problem. Next
problem could be that the cgi function is called more the once (if you
allow more than one httpd thread at a time.) In this case your cam
functions will be called more than once too. I doubt they are reentrant,
so this will be a problem. Use a mutex to lock the cam communication.
Bye,
Ole
--
kernel concepts Tel: +49-271-771091-14
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen E+ : +49-177-7420433
--
More information about the En-Nut-Discussion
mailing list