I have attached the fix in the above text file attachment.....

My SCA id is : OS0142
 
 
This message posted from opensolaris.org
-------------- next part --------------
bash-3.00# diff -u log.c.org log.c
--- log.c.org Tue Oct 2 19:45:58 2007
+++ log.c Wed Oct 31 15:49:54 2007
@@ -263,10 +263,10 @@
if (fd == -1)
return;

- (void) dup2(fd, 1);
- (void) dup2(fd, 2);
+ (void) dup2(fd, STDOUT_FILENO);
+ (void) dup2(fd, STDERR_FILENO);

- if (fd != 1 && fd != 2)
+ if (fd != STDOUT_FILENO && fd != STDERR_FILENO)
startd_close(fd);
}




bash-3.00# diff -u fork.c.org fork.c
--- fork.c.org Tue Oct 2 19:45:58 2007
+++ fork.c Sun Oct 21 15:11:32 2007
@@ -265,7 +265,7 @@
while (dup2(fd_console, STDERR_FILENO) < 0 &&
errno == EINTR)
;
- if (fd_console > 2)
+ if (fd_console > STDERR_FILENO)
(void) close(fd_console);
}




bash-3.00# diff -u startd.c.org startd.c
--- startd.c.org Tue Oct 2 19:45:58 2007
+++ startd.c Sat Oct 20 16:41:36 2007
@@ -807,12 +807,12 @@
if ((fd = open("/dev/null", O_RDONLY)) == -1) {
uu_warn(gettext("can't connect stdin to /dev/null"));
} else if (fd != 0) {
- (void) dup2(fd, 0);
+ (void) dup2(fd, STDIN_FILENO);
startd_close(fd);
}

closefrom(3);
- (void) dup2(2, 1);
+ (void) dup2(STDERR_FILENO, STDOUT_FILENO);

(void) setsid();
(void) chdir("/");

Reply via email to