This is a base-line attempt at separating errors from the child from the
ones from script itself ‒ 125 is the general-purpose code in POSIX
utilities that exec() (with 126 being ENOEXEC and 127 ‒ ENOENT)
---
Please keep me in CC, as I'm not subscribed.
usr.bin/script/script.1 | 6 ++
Use execl in both paths and the same warn() call
---
Please keep me in CC, as I'm not subscribed.
usr.bin/script/script.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 763975d6a..fd2829033 100644
---
script.1 says
> script will exit with the status of 0 unless any of its child
> processes fail, in which case, script will return 1.
This is a patent lie: it only exits with 1 if the host or writer
processes fail, not the actual child
Instead, wait for the child in the writer process and bubble
On Sun, Jan 02, 2022 at 11:52:49PM +, Jason McIntyre wrote:
> On Sun, Jan 02, 2022 at 11:47:04PM +0100, ?? wrote:
> > On Sun, Jan 02, 2022 at 06:56:37PM +, Jason McIntyre wrote:
> > > On Sat, Jan 01, 2022 at 11:07:49PM +0100, ?? wrote:
> > > > @@ -69,8 +69,8 @@ retaining the prior
On Sun, Jan 02, 2022 at 06:56:37PM +, Jason McIntyre wrote:
> On Sat, Jan 01, 2022 at 11:07:49PM +0100, ?? wrote:
> > @@ -69,8 +69,8 @@ retaining the prior contents.
> > .It Fl c Ar command
> > Run
> > .Ar command
> > +.Pq via Nm sh Fl c Ar command
> > instead of an interactive shell.
script.1 says
> script will exit with the status of 0 unless any of its child
> processes fail, in which case, script will return 1.
This is a patent lie: it only exits with 1 if the host or writer
processes fail, not the actual child
Instead, wait for the child in the writer process and bubble
Use execl in both paths and the same warn() call
---
usr.bin/script/script.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 763975d6a..fd2829033 100644
--- a/usr.bin/script/script.c
+++
This is a base-line attempt at separating errors from the child from the
ones from script itself ‒ 125 is the general-purpose code in POSIX
utilities that exec() (with 126 being ENOEXEC and 127 ‒ ENOENT)
---
usr.bin/script/script.1 | 6 ++
usr.bin/script/script.c | 6 +++---
2 files changed,
The original wording is weird and doesn't explicitly say that it does
sh -c, which is the fundamental point ‒ spell it out directly
---
usr.bin/script/script.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1
index
9 matches
Mail list logo