Mail Archives: cygwin-developers/1998/11/13/18:23:26
Hello!
Interesting effect:
tcsh does a lot of dup()-calls. The following code in tcsh:
...
close(0);
(void) dup(foo_fd);
...
doesn't create fd == 0 but something like 55 or else. This only
happens, if tcsh is a subshell. If tcsh is the login shell,
anything works. And, for test purposes, I have substituted the
above code by:
...
close(0);
(void) dup2(foo_fd, 0);
...
and it did it as expected! The new fd is 0 in subshells, too.
It happens in tty and notty mode.
Seems to be a problem in dup().
Any idea?
Corinna
- Raw text -