CVS update: php31/ext/standard
| From: | rasmus | Date: | Tue, 25 Aug 1998 18:56:31 +0000 |
| Subject: | CVS update: php31/ext/standard | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-572@lists.php.net to get a copy of this message | ||
Date: Tuesday August 25, 1998 @ 14:56
Author: rasmus
Update of /repository/php31/ext/standard
In directory asf:/export/home/rasmus/php31/ext/standard
Modified Files:
file.c
Log Message:
Delete file upload temp files after a request
Index: php31/ext/standard/file.c
diff -c php31/ext/standard/file.c:2.1 php31/ext/standard/file.c:2.2
*** php31/ext/standard/file.c:2.1 Fri Aug 14 00:32:05 1998
--- php31/ext/standard/file.c Tue Aug 25 14:56:29 1998
***************
*** 26,32 ****
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 2.1 1998/08/14 04:32:05 shane Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 26,32 ----
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 2.2 1998/08/25 18:56:29 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 80,85 ****
--- 80,86 ----
int le_fp,le_pp;
int wsa_fp; /*to handle reading and writing to windows sockets*/
static int pclose_ret;
+ extern int le_uploads;
#endif
#if !HAVE_TEMPNAM
***************
*** 292,297 ****
--- 293,303 ----
}
}
+ static void _php3_unlink_uploaded_file(char *file) {
+ if(file) {
+ unlink(file);
+ }
+ }
int php3_minit_file(INIT_FUNC_ARGS)
{
***************
*** 300,305 ****
--- 306,312 ----
GLOBAL(le_fp) = register_list_destructors(fclose,NULL);
GLOBAL(le_pp) = register_list_destructors(__pclose,NULL);
GLOBAL(wsa_fp) = register_list_destructors(_php3_closesocket,NULL);
+ GLOBAL(le_uploads) = register_list_destructors(_php3_unlink_uploaded_file,NULL);
return SUCCESS;
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net