cvs: php-src(PHP_5_3) /ext/standard proc_open.c
| From: | Dmitry Stogov | Date: | Thu, 21 Aug 2008 11:27:57 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/standard proc_open.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52560@lists.php.net to get a copy of this message | ||
dmitry Thu Aug 21 11:27:57 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/standard proc_open.c
Log:
Adder error code into error message
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.17.2.4&r2=1.36.2.1.2.17.2.5&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.4
php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.5
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.4 Wed Jul 23 11:25:14 2008
+++ php-src/ext/standard/proc_open.c Thu Aug 21 11:27:57 2008
@@ -15,7 +15,7 @@
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.36.2.1.2.17.2.4 2008/07/23 11:25:14 tony2001 Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.17.2.5 2008/08/21 11:27:57 dmitry Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -769,6 +769,8 @@
}
if (FALSE == newprocok) {
+ DWORD dw = GetLastError();
+
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
CloseHandle(descriptors[i].childend);
@@ -776,7 +778,7 @@
CloseHandle(descriptors[i].parentend);
}
}
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess failed");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess failed, error code - %u",
dw);
goto exit_fail;
}