This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Crash in scm_boot_guile if stdin isn't open.


Marius Vollmer <mvo@zagadka.ping.de> writes:

> Jon K Hellan <hellan@acm.org> writes:
> 
> > On Sat, Mar 11, 2000 at 06:06:29PM +0100, Marius Vollmer wrote:
> > 
> > > I think Guile should not produce a segmentation fault, but I also
> > > think that one never ever should expect a program to run with a
> > > invalid fd 0.  Instead, one should hook fd 0 to /dev/null or
> > > something.  The standard streams should always be valid (IMO).
> > 
> > Hmm. We'll probably do that as a workaround. But I don't think an
> > embedded interpreter should make assumptions about which streams are
> > valid.
> 
> Maybe.  But I think aborting when fd 0 is invalid is acceptable
> behaviour of libguile.  I think any Unix Program can make the
> assumption that when any of the standard file descriptors are open,
> they are used for their standard purpose. 

It isn't open. It's closed. 

> I would not label the solution of pointing fd 0 at /dev/null as a work
> around.  You just can't hope to get away with making fd 0 invalid.

It's not something we do. It's something which the environment may do
to us. All apps have to make sure that we can survive that kind of
thing. In our case, we only have problems when we embed guile. Of
course we can make a workaround. In fact, I already checked one
in. But the Gnumeric maintainer asked me to disable it. Anyway, it's
better that guile works around it than that all apps which embed it
each have to make a workaround.

Regards

Jon





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]