Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: dsr@mail.lns.cornell.edu (Daniel S. Riley)
Subject: wordexp (not Re: nanosleep ?)
Date: 1999/08/25	[thread overview]
Message-ID: <shemgrj1r8.fsf_-_@lnscu4.lns.cornell.edu> (raw)
In-Reply-To: slrn7s2kjn.886.dblake@popper.ucsf.edu

dblake@popper.ucsf.edu (David T. Blake) writes:
> So that if the environment is not what ksh wants, you get a return
> value of zero. What do I need to do in my program to ensure that
> the above ksh call works properly ?

Have you set WRDE_SHOWERR to see if anything prints to stderr?

> On a second note, it is pretty messed up to have your C library 
> functions rely on ksh expansions. It really ought to go the other
> way.

POSIX Std 1003.2-1992, section E.9.9 (Rationale and Notes):

  While wordexp() could be implemented entirely as a library routine,
  it is expected that most implimentations will run a shell in a
  subprocess to do the expansion.

wordexp() is not even close to what I would consdider a core C library
routine, sh and ksh predate wordexp() considerably, and, given all the
weird parsing they do, getting wordexp() into a form actually usable
by the various shells would be next to impossible.  In context, forking
a shell to do shell word expansion is a reasonable implimentation, as
the POSIX committee acknowledged.
-- 
Dan Riley                                         dsr@mail.lns.cornell.edu
Wilson Lab, Cornell University      <URL:http://www.lns.cornell.edu/~dsr/>
    "History teaches us that days like this are best spent in bed"



  parent reply	other threads:[~1999-08-25  4:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-20  4:00 nanosleep ? Andreas Schnorr ATS/AT #47493
1999-08-20  4:00 ` linnartz
1999-08-23  4:00 ` Mark Koennecke
1999-08-23  4:00   ` Dave Butenhof
1999-08-23  4:00     ` David T. Blake
1999-08-25  4:00       ` Dave Butenhof
1999-08-25  4:00         ` David T. Blake
1999-08-25  4:00       ` Daniel S. Riley [this message]
1999-08-25  4:00         ` wordexp (not Re: nanosleep ?) David T. Blake
1999-08-25  4:00           ` David T. Blake
1999-08-26  4:00             ` Peter da Silva
1999-08-26  4:00               ` David T. Blake
1999-08-26  4:00                 ` Peter da Silva
1999-08-24  4:00     ` nanosleep ? Mark Koennecke
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