An execute-only fd (opened with O_EXEC) allows neither read() nor write() and is therefore incompatible with all stdio modes. Therefore, the [EINVAL] error applies. Also adjust the similar check in freopen() with a NULL path, even though this checks an fd which is already from a FILE.
11 lines
123 B
Bash
11 lines
123 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
cd `dirname $0`
|
|
|
|
executable=`basename $0 .t`
|
|
|
|
make $executable 2>&1 > /dev/null
|
|
|
|
exec ./$executable
|