On Mon, Sep 30, 2024 at 10:46:12PM +, RVP wrote:
> On Sun, 29 Sep 2024, tlaro...@kergis.com wrote:
>
> > POSIX requires that PATH searching be done only if the identifier
> > (aka "file") has no '/' (if it has, it is a "path").
> >
> > Allow searching qualified filenames, i.e. Resource Identi
On Mon, Sep 30, 2024 at 1:09 PM wrote:
> So how can the test be reliable in all circumstances?
>
test -t 0
is reliable.
I use
tty -s || return 0
to remind me what I'm testing for (same difference),
and branch out of .profile for not interactive sessions.
--
George Georgalis, (415) 894-271
RVP wrote in
:
|On Mon, 30 Sep 2024, tlaro...@kergis.com wrote:
|> But, if I'm not mistaken, the discussion was about testing if a shell
|> is interactive, that is, "inheriting" whatever has been set and
|> testing it. Since SHELL is not set by all login programs (your
|> example of xterm) an
On Sun, 29 Sep 2024, tlaro...@kergis.com wrote:
POSIX requires that PATH searching be done only if the identifier
(aka "file") has no '/' (if it has, it is a "path").
Allow searching qualified filenames, i.e. Resource Identifier,
like dk/ctl, vect/in/dxf by setting an environment variable
PATH_
On Mon, 30 Sep 2024, tlaro...@kergis.com wrote:
But, if I'm not mistaken, the discussion was about testing if a shell
is interactive, that is, "inheriting" whatever has been set and
testing it. Since SHELL is not set by all login programs (your
example of xterm) and since the variable, if redefi
On Mon, Sep 30, 2024 at 08:39:47PM +, RVP wrote:
> [...]
> On Mon, 30 Sep 2024, tlaro...@kergis.com wrote:
>
> > What I mean is that if I'm under ksh, and then I switch to sh even
> > explicitely setting interactive :
> >
> > $ printenv
> >
> > _=/usr/bin/printenv
> > ...
> > SHELL=/bin/ksh
On Mon, 30 Sep 2024, Greg A. Woods wrote:
SHELL is set by ksh and not by sh (sh handles NETBSD_SHELL), if I'm
not mistaken?
login(1) sets $SHELL, [...]
and also by programs which start a shell in a pty: xterm/script/tmux/...
However, xterm _doesn't_ set SHELL if what was passed is not in /e
On Mon, Sep 30, 2024 at 12:14:44PM -0700, Greg A. Woods wrote:
> > SHELL is set by ksh and not by sh (sh handles NETBSD_SHELL), if I'm
> > not mistaken?
>
> login(1) sets $SHELL, and in the BSD world it has done so since 4.2 or
> before. In the AT&T Unix world it has done so since at least
> Sys
> SHELL is set by ksh and not by sh (sh handles NETBSD_SHELL), if I'm
> not mistaken?
login(1) sets $SHELL, and in the BSD world it has done so since 4.2 or
before. In the AT&T Unix world it has done so since at least
System III, aka UNIX 3.0.
IIRC in 7th Edition Research Unix since there was o
On Sun, Sep 29, 2024 at 01:42:36PM +0200, tlaro...@kergis.com wrote:
> If the execvp(3) checks that the name passed is not the empty string,
> posix_spawnp(3) doesn't with the file argument.
>
> Is it intended?
It is just an optimization to speed up failure. I'll add it to posix_spawnp(3)
too.
M
diff --git a/include/paths.h b/include/paths.h
index 5efd2328cb74..df6d4bc0a00f 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -37,7 +37,7 @@
/*
* Default user search path.
* Set by login(1), rshd(8), rexecd(8)
- * Used by execvp(3) absent PATH from the environ(7)
+ * Used by execvp(3
On Mon, 30 Sep 2024, Robert Elz wrote:
| This is _very_ surprising; esp. when /bin/sh doesn't allow chars.
| like `/' and `.' in the function name.
Huh?
sh $ a.v() echo I have a dot in my name
sh $ a.v
I have a dot in my name
Ah, that's right. It's FreeBSD's /bin/sh (and dash) which doesn
12 matches
Mail list logo