Re: forkpty with streams

From: Doug McNaught (doug@mcnaught.org)
Date: Fri Jul 25 2003 - 08:02:53 EST


Andrew Barton <andrevv@users.sourceforge.net> writes:

> I've got the 2.4 kernel, and I'm trying to use the forkpty() system call
> with the standard I/O stream functions. The calls to forkpty() and
> fdopen() and fprintf() all return successfully, but the data never seems
> to get to the child process. In this simplified example, I am trying to
> open a shell in a pseudo terminal and then send it the string "exit\n"
> and then wait for it to die. But the shell apparently never sees the
> "exit\n", and the parent waits forever.

forkpty() is not a system call. This is more likely to be a glibc
issue or a problem with your code. You might consider running your
test under 'strace' to see what is happening under the covers.

-Doug
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:25 EST