delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/15/08:27:41

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: last snapshot.
15 Oct 1998 08:27:41 -0700 :
Message-ID: <19981015111953.A839.cygnus.cygwin32.developers@cygnus.com>
References: <01BDF835 DOT 462002A0 AT sos>
Mime-Version: 1.0
To: Sergey Okhapkin <sos AT prospect DOT com DOT ru>,
"'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

On Thu, Oct 15, 1998 at 12:12:41PM +0300, Sergey Okhapkin wrote:
>Sergey Okhapkin wrote:
>> in.rexecd from inetutils fails to run with the latest dll. I don't know 
>why...
>
>Tue Oct  6 11:04:43 1998  Christopher Faylor <cgf AT cygnus DOT com>
>
>	Change Create[A-Z]* calls throughout to use sec_none_nih
>	to avoid subprocesses accidentally inheriting handles.

I don't see anything in the path of sexec that would be related to this
change which would be causing your problem.  In fact, rexec is working
fine for me.  Is it possible that these two changes may rectify the
problem?

>All sexec* calls now always fails... Also there is a bug in hinfo::dup2 - 
>if oldfd==newfd, debug printfs traps because newfh is null. I can't debug 
>anything now - my monitor is out of order, it works only 5 minutes per hour 
>:-)

Index: hinfo.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/hinfo.cc,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -p -r1.60 -r1.61
--- hinfo.cc	1998/10/13 03:14:53	1.60
+++ hinfo.cc	1998/10/15 12:57:38	1.61
@@ -311,16 +311,7 @@ hinfo::dup2 (int oldfd, int newfd)
     set_std_handle (res);
 
  done:
-  if (res >= 0)
-    {
-      syscall_printf ("%d = dup2 (%d, %d) (%d:%p)",
-		     res, oldfd, newfd, res,
-		     newfh->get_handle ());
-    }
-  else
-    {
-      syscall_printf ("%d = dup2 (%d, %d)", res, oldfd, newfd);
-    }
+  syscall_printf ("%d = dup2 (%d, %d)", res, oldfd, newfd);
 
   MARK();
   return res;


Index: fcntl.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/fcntl.cc,v
retrieving revision 1.23
diff -u -p -r1.23 fcntl.cc
--- fcntl.cc	1998/10/08 22:40:51	1.23
+++ fcntl.cc	1998/10/15 15:19:24
@@ -35,7 +35,7 @@ _fcntl (int fd, int cmd,...)
       va_start (args, cmd);
       arg = va_arg (args,int);
       va_end (args);
-      res = dup2 (fd, arg);
+      res = dup2 (fd, dtable.find_unused_handle (arg));
       goto done;
 
     case F_GETFD:

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019