Re: having difficulties with mc/src/subshell.c

STDOUT_FILENO is a file number.  The stdout global variable is a (FILE *)
pointer.  If you want to get the file numbr for a (FILE *) pointer, use
the fileno() function.



On Mon, 6 Dec 1999, Jason Hudgins wrote:

> I'm trying to fix a small problem with mc on Solaris 2.6
> tcgetattr(&__iob[1], &shell_mode) works perfectly in my test code (it
> returns true), however 
> when I stick the exact same stuff into subshell.c in replacement of 
> tcgetattr(STDOUT_FILENO, &shell_mode) I keep getting this when running
> gmc:
> subshell.c: couldn't get terminal settings: Bad file number
> stdout is defined as &__iob[1] in Solaris's stdio.h.
> perhaps STDOUT is no longer a valid file descriptor while running under
> X?  I'm not 
> enough of a unix guru to know.  Any pointers?
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]