9front - general discussion about 9front
 help / color / mirror / Atom feed
From: tlaronde@polynum.com
To: 9front@9front.org
Subject: Pb with scripts under APE calling rc scripts
Date: Mon, 19 Oct 2020 19:53:40 +0200	[thread overview]
Message-ID: <20201019175340.GA109@polynum.com> (raw)

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


                 reply	other threads:[~2020-10-19 18:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201019175340.GA109@polynum.com \
    --to=tlaronde@polynum.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).