Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.lang.python / Re: Find the path of a shell command [POSTPONED]

SubjectAuthor
o Re: Find the path of a shell command [POSTPONED]Peter J. Holzer

1
Re: Find the path of a shell command [POSTPONED]

<mailman.724.1665940596.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19924&group=comp.lang.python#19924

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Find the path of a shell command [POSTPONED]
Date: Sun, 16 Oct 2022 19:16:34 +0200
Lines: 74
Message-ID: <mailman.724.1665940596.20444.python-list@python.org>
References: <CAGGBd_pFLgkeO=MvEPk=2G8MQLMxmzgMHZp6Cjg5L97H0GQJeQ@mail.gmail.com>
<C300C53C-84C5-4434-B0B7-4E3F72E3DB35@barrys-emacs.org>
<20221016171634.mzpznpeaumntaoep@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="wpcg55wpengwdh7s"
X-Trace: news.uni-berlin.de FcmrZASLECOr1mRVj7cG4gVkcx5d6sTNal0J8GSc/UGQ==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2022': 0.05; 'content-
type:multipart/signed': 0.05; 'subject: [': 0.07; 'content-
type:application/pgp-signature': 0.09; 'cron': 0.09; 'dan': 0.09;
'filename:fname piece:asc': 0.09; 'filename:fname
piece:signature': 0.09; 'filename:fname:signature.asc': 0.09;
'linux': 0.09; 'macos,': 0.09; 'restart': 0.09; "they've": 0.09;
'problem.': 0.15; '"creative': 0.16; '...]': 0.16; '2022,': 0.16;
'__/': 0.16; 'barry': 0.16; 'cameron': 0.16; 'challenge!"': 0.16;
'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16;
'from:name:peter j. holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer':
0.16; 'reality.': 0.16; 'script,': 0.16; 'simpson': 0.16;
'stross,': 0.16; 'url-ip:212.17.106.137/32': 0.16; 'url-
ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16; 'url:hjp':
0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'problem': 0.16; 'larger':
0.17; 'to:addr:python-list': 0.20; "i've": 0.22; "what's": 0.22;
'command': 0.23; '(and': 0.25; 'past': 0.25; 'bit': 0.27; 'old':
0.27; '>>>': 0.28; 'sense': 0.28; 'environment': 0.29; 'this?':
0.29; 'think': 0.32; "doesn't": 0.32; 'deleted': 0.32; 'launched':
0.32; "i'm": 0.33; 'there': 0.33; 'script': 0.33; 'someone': 0.34;
'header:In-Reply-To:1': 0.34; 'fine': 0.35; 'could': 0.38; 'use':
0.39; 'wed,': 0.39; 'still': 0.40; 'including': 0.60;
'received:212': 0.62; 'received:userid': 0.66; 'during': 0.69;
'manually': 0.69; 'url-ip:212/8': 0.69; 'subject:]': 0.70;
'happens': 0.84; 'received:at': 0.84; 'sure.': 0.84
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <C300C53C-84C5-4434-B0B7-4E3F72E3DB35@barrys-emacs.org>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20221016171634.mzpznpeaumntaoep@hjp.at>
X-Mailman-Original-References: <CAGGBd_pFLgkeO=MvEPk=2G8MQLMxmzgMHZp6Cjg5L97H0GQJeQ@mail.gmail.com>
<C300C53C-84C5-4434-B0B7-4E3F72E3DB35@barrys-emacs.org>
 by: Peter J. Holzer - Sun, 16 Oct 2022 17:16 UTC
Attachments: signature.asc (application/pgp-signature)

On 2022-10-16 17:21:03 +0100, Barry wrote:
> > On 16 Oct 2022, at 04:53, Dan Stromberg <drsalists@gmail.com> wrote:
> >
> > On Wed, Oct 12, 2022 at 9:57 PM Cameron Simpson <cs@cskk.id.au> wrote:
> >
> >>> On 13Oct2022 03:25, Paulo da Silva <p_d_a_s_i_l_v_a_ns@nonetnoaddress.pt>
> >>> wrote:
> >>> There is another problem involved. The script, works fine except when
> >>> launched by cron! Why?
[... script deleted ...]
> >> Cron's environment is very minimal. This will show you what's in
> >> it.
> >
> > Careful. On some systems if someone restarts the cron daemon, it could
> > pick up a larger environment than after being started on boot.
>
> That have to a old system that does not use systemd.

Systemd is specific to Linux - and not even used by all Linux
distributions.

> Is there a specific system that still does this?

Not sure. Some Unixes I've used in the past (probably including some
Linux distributions) had this problem. So you had to be a bit careful
when restarting daemons from the command line. I think the sysVinit
system used by most Linux distributions before systemd did clean up the
environment if you used it correctly (but I'm not sure and have no
system anymore to test it). I haven't used Solaris or HP/UX in a long
time (and other Unixes even longer) so I don't know what they do these
days. And I've never used MacOS, I just know that they've used a system
of their own long before systemd.

Anyway he doesn't have to restart cron to add a cron-job (nor for any
other reason during normal operation), so what happens if you manually
restart cron is almost certainly irrelevant for the OP.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor