blob: ef0ff90f58164f2fdd8a9dbeeb704cb8f5fd69ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Execlp resolves binaries from path correctly
# This might for example fail, when errno is not
# passed through correctly in exec calls.
set -e
CODE=execpathtest
cat > $CODE.c <<EOF
#include <unistd.h>
#include <stdio.h>
int main() {
int rc=execlp("true","true",(char*)NULL);
if(rc!=0) { perror("wOOt"); }
return rc;
}
EOF
gcc $CODE.c -o $CODE
./$CODE
fakeroot ./$CODE
|