ID: 48820
Updated by: [email protected]
Reported By: arekm at maven dot pl
-Status: Open
+Status: Feedback
Bug Type: POSIX related
Operating System: Linux
PHP Version: 5.2.10, 5.3.0
New Comment:
I feel a bit stupid for asking this..but how/why do you build in non
terminal..? :)
Previous Comments:
------------------------------------------------------------------------
[2009-07-06 16:22:29] arekm at maven dot pl
Description:
------------
ttyname_r() check done in configure is wrong because it relies on doing
build on a terminal. Building on non terminal causes failure.
Reproduce code:
---------------
This is test taken from configure:
[ar...@t400 ~/test/3]$ more a.c
#include <unistd.h>
int main(int argc, char *argv[])
{
char buf[64];
return ttyname_r(0, buf, 64) ? 1 : 0;
}
[ar...@t400 ~/test/3]$ gcc a.c
[ar...@t400 ~/test/3]$ ./a.out
[ar...@t400 ~/test/3]$ echo $?
0
success - we are on a terminal
[ar...@t400 ~/test/3]$ ./a.out < /dev/null
zsh: exit 1 ./a.out < /dev/null
[ar...@t400 ~/test/3]$ echo $?
1
[ar...@t400 ~/test/3]$
failure - we are not on terminal
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48820&edit=1