• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // commit 2b2aff37aced66e4a50a38a14607a9b1dc0ee001 2013-10-03
2 // execle should pass env properly
3 #include <string.h>
4 #include <errno.h>
5 #include <unistd.h>
6 #include "test.h"
7 
main(void)8 int main(void)
9 {
10 	char *env[] = {"VAR=abc", 0};
11 
12 	execle("/bin/sh", "sh", "-c",
13 		"[ \"$VAR\" = abc ] || { echo '"__FILE__": env is not passed'; exit 1; }",
14 		(char*)0, env);
15 
16 	t_error("execle failed: %s\n", strerror(errno));
17 	return 1;
18 }
19