9front - general discussion about 9front
 help / color / mirror / Atom feed
* Pb with scripts under APE calling rc scripts
@ 2020-10-19 17:53 tlaronde
  0 siblings, 0 replies; only message in thread
From: tlaronde @ 2020-10-19 17:53 UTC (permalink / raw)
  To: 9front

Hello,

Note: I have updated the system to the latest release of today.

For kerTeX, since I have to support a myriad of systems, the packaging
system uses a small subset of POSIX.2 utilities so that I have only to
write one pkg for everybody.

There are some utilities that are not POSIX.2 and, by system, some
bourne shell code is written to provide the functionnalities (the
majority is around getting external data---downloading with ftp or http).

In order to be able to more easily correct what is system dependent,
the system dependent code is now a separate file, dot'ed in the main
shell library file that is also! dot'ed in the pkg building script
(in the previous releases, during compilation,
the system dependent code was interpolated in the library so there was
only one shell library file dot'ed by the pkg script).

Now, when invoking utilities that are implemented as rc scripts (namely:
ls(1) and hget(1)), these scripts have an environment totally cleared
with apparently path unset or set to '.' being, strangely, the directory
where the dot'ed chunk is.

Thus the scripts don't find anything in /bin.

I have circumvanted the problem by implementing ls(1) (for my use) around
du(1) and by setting explicitely "path='/bin'" before calling hget(1).

Further note: calling rc -c 'rfork E; some_utility ...' does not work
either from inside the code. While the same commands work when invoked
on the command line (even invoking "/bin/ape/sh some_script" under,
already, /bin/ape/sh works...).

Does this ring a bell to somebody?

Best,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                http://www.kergis.com/kertex.html
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-19 18:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 17:53 Pb with scripts under APE calling rc scripts tlaronde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).