Skip to content
Snippets Groups Projects
Commit 3e84d6e2 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix for running configure remotely

Rev: src/configure.in:1.85
Rev: src/fd_control.c:1.7
parent 4ac8383d
No related branches found
No related tags found
No related merge requests found
AC_REVISION("$Id: configure.in,v 1.84 1997/04/16 03:09:10 hubbe Exp $")
AC_REVISION("$Id: configure.in,v 1.85 1997/04/16 23:04:51 hubbe Exp $")
AC_INIT(interpret.c)
AC_CONFIG_HEADER(machine.h)
......@@ -668,6 +668,7 @@ AC_CHECK_FUNCS(
dlsym \
dld_link \
dld_get_func \
pipe \
)
if test $ac_cv_func_crypt$ac_cv_func__crypt = nono ; then
......
......@@ -92,6 +92,9 @@ int set_close_on_exec(int fd, int which)
#ifdef TESTING
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/* a part of the autoconf thingy */
RETSIGTYPE sigalrm_handler0(int tmp) { exit(0); }
......@@ -99,15 +102,23 @@ RETSIGTYPE sigalrm_handler1(int tmp) { exit(1); }
main()
{
int tmp[2];
char foo[1000];
set_nonblocking(0,1);
tmp[0]=0;
tmp[1]=0;
#ifdef HAVE_PIPE
pipe(tmp);
#endif
set_nonblocking(tmp[0],1);
signal(SIGALRM, sigalrm_handler1);
alarm(1);
read(0,foo,999);
set_nonblocking(0,0);
read(tmp[0],foo,999);
set_nonblocking(tmp[0],0);
signal(SIGALRM, sigalrm_handler0);
alarm(1);
read(0,foo,999);
read(tmp[0],foo,999);
exit(1);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment