mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
parent
c768abd420
commit
261a5305c6
14
phpdbg.c
14
phpdbg.c
@ -831,7 +831,13 @@ int main(int argc, char **argv) /* {{{ */
|
||||
zend_bool remote = 0;
|
||||
int run = 0;
|
||||
int step = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
char *bp_tmp_file;
|
||||
#else
|
||||
char bp_tmp_file[] = "/tmp/phpdbg.XXXXXX";
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
char *address;
|
||||
int listen[2];
|
||||
@ -871,8 +877,12 @@ int main(int argc, char **argv) /* {{{ */
|
||||
|
||||
phpdbg_main:
|
||||
if (!cleaning) {
|
||||
#ifdef _WIN32
|
||||
bp_tmp_file = malloc(L_tmpnam);
|
||||
tmpnam(bp_tmp_file);
|
||||
#else
|
||||
mkstemp(bp_tmp_file);
|
||||
#endif
|
||||
if (bp_tmp_file == NULL) {
|
||||
phpdbg_error("Unable to create temporary file");
|
||||
}
|
||||
@ -1342,7 +1352,11 @@ phpdbg_out:
|
||||
free(sapi_name);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
free(bp_tmp_file);
|
||||
#else
|
||||
unlink(bp_tmp_file);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
} /* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user