From: dsg@mitre.org (David S. Goldberg)
Subject: Re: grantpt() fails after repeated operations
Date: 1998/06/05 [thread overview]
Message-ID: <m1bn2bskk1z.fsf@blackbird.mitre.org> (raw)
In-Reply-To: 3576D202.6570@nospam.com
> PROBLEM/ BACKGROUND: I'm trying to establish a pseudo-tty slave
> driver which runs ftp as a child process, allowing me to write ftp
> commands and read replies (I know expect does this, but ...)
[... grantpt starts failing]
Do you have a SIGCHLD handler set for dealing with your sub process?
If so, recall that grantpt calls an external program (at least it does
on SYSVR4 -- I assume the same on your system, but don't know for
sure) which will cause your handler to be run when that exits. If
your handler does anything besides reaping the child process, it may
screw up grantpt's wait for it's child and cause a failure. When this
happened to me it happened almost all the time, but it did work
occasionally until I figured it out (truss is a wonderful tool...) so
it's possible you're being similarly bit.
--
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 781-271-3887
Email: dsg@mitre.org
next prev parent reply other threads:[~1998-06-05 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-04 4:00 grantpt() fails after repeated operations Dean J.
1998-06-05 4:00 ` David S. Goldberg [this message]
1998-06-05 4:00 ` Serguei Patchkovskii
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox