summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-02 23:56:12 +1100
committerDamien Miller <djm@mindrot.org>2000-03-02 23:56:12 +1100
commit204ad074e51c0e9c25666eb044e4c255bcfe64b6 (patch)
tree4c436060e703711ea7fb31ae55329ae414cf86f8 /configure.in
parentc4cea3e5c71c8f2d48ee22ea05d26a47fb47ad29 (diff)
- Warning was valid - possible race condition on PTYs. Avoided using
platform-specific code. - Document some common problems
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in23
1 files changed, 21 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 1cb46525..e5bdc445 100644
--- a/configure.in
+++ b/configure.in
@@ -55,6 +55,7 @@ case "$host" in
;;
*-*-linux*)
no_dev_ptmx=1
+ need_pty_removed_on_close=1
;;
*-*-netbsd*)
need_dash_r=1
@@ -518,9 +519,27 @@ if test ! -z "$nolastlog" ; then
fi
if test -z "$no_dev_ptmx" ; then
- AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX))
+ AC_CHECK_FILE("/dev/ptmx",
+ [
+ AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
+ have_dev_ptmx=1
+ ]
+ )
+fi
+AC_CHECK_FILE("/dev/ptc",
+ [
+ AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
+ have_dev_ptc=1
+ ]
+)
+
+# Some systems (defined in platform-specific code above) automagically remove
+# Unix98 ptys when they are closed
+if test "x$ac_cv_func_openpty" = "xyes" -o "x$have_dev_ptmx" = "x1" -o "x$have_dev_ptc" = "x1" ; then
+ if test "x$need_pty_removed_on_close" = "x1" ; then
+ AC_DEFINE(PTY_REMOVED_ON_CLOSE)
+ fi
fi
-AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC))
# Options from here on. Some of these are preset by platform above