To: None <firstname.lastname@example.org>
From: Gordon W. Ross <email@example.com>
Date: 07/01/1996 10:16:36
> Date: Sat, 29 Jun 1996 11:21:43 -0400
> From: Trevor Blackwell <firstname.lastname@example.org>
> Subject: openpty fails when used multiple times
> If you call openpty (in libutil) more than once, it hangs.
> The problem is that it doesn't restore some static variables, and
> tries to open /dev/ttyXX instead of /dev/ptyXX on invocations after
> the first.
> Here is a fix:
> (in /usr/src/lib/libutil)
It might be better to make the character array "line" a local,
and initialize it on entry. That is more "shlib friendly" and
just better practice than using static storage...