Index: mono/io-layer/processes.c
===================================================================
RCS file: /mono/mono/mono/io-layer/processes.c,v
retrieving revision 1.11
diff -u -r1.11 processes.c
--- mono/io-layer/processes.c	21 Feb 2003 13:22:10 -0000	1.11
+++ mono/io-layer/processes.c	27 Feb 2003 23:35:14 -0000
@@ -89,7 +89,7 @@
 			WapiStartupInfo *startup,
 			WapiProcessInformation *process_info)
 {
-	gchar *cmd=NULL, *prog, *full_prog, *args=NULL, *args_after_prog=NULL, *dir=NULL;
+	gchar *cmd=NULL, *prog = NULL, *full_prog = NULL, *args=NULL, *args_after_prog=NULL, *dir=NULL;
 	guint32 env=0, stored_dir=0, stored_prog=0, i;
 	gboolean ret=FALSE;
 	gpointer stdin_handle, stdout_handle, stderr_handle;
@@ -328,6 +328,17 @@
 		if(token[0]=='/') {
 			/* Assume full path given */
 			prog=g_strdup (token);
+			
+			/* Executable existing ? */
+			if(access (prog, X_OK)!=0) {
+				g_free (prog);
+#ifdef DEBUG
+				g_message (G_GNUC_PRETTY_FUNCTION ": Couldn't find executable %s", token);
+#endif
+				g_free (token);
+				goto cleanup;
+			}
+
 		} else {
 			char *curdir=g_get_current_dir ();
 
