svn commit: trunk/uClibc/test/unistd

vapier at uclibc.org vapier at uclibc.org
Fri Jun 27 19:13:07 UTC 2008


Author: vapier
Date: 2008-06-27 12:13:06 -0700 (Fri, 27 Jun 2008)
New Revision: 22538

Log:
add test case for argv[0] == null

Added:
   trunk/uClibc/test/unistd/exec-null.c

Modified:
   trunk/uClibc/test/unistd/


Changeset:

Property changes on: trunk/uClibc/test/unistd
___________________________________________________________________
Name: svn:ignore
   - clone
errno
fork
getcwd
getopt
getopt_long
tst-preadwrite
tst-preadwrite64
tstgetopt
vfork
*_glibc
*.gdb
*.out

   + clone
errno
exec-null
fork
getcwd
getopt
getopt_long
tst-preadwrite
tst-preadwrite64
tstgetopt
vfork
*_glibc
*.gdb
*.out


Added: trunk/uClibc/test/unistd/exec-null.c
===================================================================
--- trunk/uClibc/test/unistd/exec-null.c	                        (rev 0)
+++ trunk/uClibc/test/unistd/exec-null.c	2008-06-27 19:13:06 UTC (rev 22538)
@@ -0,0 +1,13 @@
+/* make sure we handle argv[0] == NULL */
+
+#include <unistd.h>
+
+int main(int argc, char *argv[])
+{
+	if (argc == 0)
+		return 0;
+
+	char *exec_argv[1], *exec_envp[1];
+	exec_argv[0] = exec_envp[0] = NULL;
+	return execve("./exec-null", exec_argv, exec_envp);
+}




More information about the uClibc-cvs mailing list