~cdv

Massachusetts, USA

https://chris.vittal.dev

I write free software.

https://hail.is during the day. Everything else at night.

~cdv/public-inbox

Last active 2 months ago
View more

Recent activity

[PATCH] tests: make echo tests robust to build directory 3 months ago

From Chris Vittal to ~sircmpwn/ctools

---
 test/echo | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/echo b/test/echo
index 3004665..61f5fbf 100644
--- a/test/echo
+++ b/test/echo
@@ -3,22 +3,22 @@ tool="echo"
. "$HARNESS"

should_handle_one_string() (
	ct="$(../build/echo "this is a test string")"
	ct="$(./echo "this is a test string")"
[message trimmed]

[PATCH] env: fix potential NULL pointer dereference 3 months ago

From Chris Vittal to ~sircmpwn/ctools

The two points where the elements of environ are accessed need to be
guarded with a NULL check. env can segfault otherwise.

---
Edited from Stefan Tatschner's original env patch.

 src/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/env.c b/src/env.c
index db86b97..f1a4520 100644
--- a/src/env.c
+++ b/src/env.c
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
[message trimmed]

[PATCH sr.ht-docs] Make example not broken up by Table of Contents 3 months ago

From Chris Vittal to ~sircmpwn/sr.ht-dev

When this page was rendered, the table of contents sat between the
example JSON and it's description at the end of the first paragraph.
---
Note, I have not tested this

 builds.sr.ht/triggers.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builds.sr.ht/triggers.md b/builds.sr.ht/triggers.md
index dc0ffea..eb3ee09 100644
--- a/builds.sr.ht/triggers.md
@@ -3,7 +3,9 @@ title: Build triggers reference
---
[message trimmed]

[PATCH v2] Implement nohup 3 months ago

From Chris Vittal to ~sircmpwn/ctools

---
v1 -> v2:
	lines are 80 characters
	update STATUS

 STATUS           |   2 +-
 doc/meson.build  |   1 +
 doc/nohup.1.scd  |  37 +++++++++++++
 meson.build      |   1 +
 src/nohup.c      | 135 +++++++++++++++++++++++++++++++++++++++++++++++
 test/meson.build |   1 +
 test/nohup       |  38 +++++++++++++
 7 files changed, 214 insertions(+), 1 deletion(-)
 create mode 100644 doc/nohup.1.scd
[message trimmed]

[PATCH] Implement nohup 3 months ago

From Chris Vittal to ~sircmpwn/ctools

---
 doc/meson.build  |   1 +
 doc/nohup.1.scd  |  37 +++++++++++++
 meson.build      |   1 +
 src/nohup.c      | 134 +++++++++++++++++++++++++++++++++++++++++++++++
 test/meson.build |   1 +
 test/nohup       |  38 ++++++++++++++
 6 files changed, 212 insertions(+)
 create mode 100644 doc/nohup.1.scd
 create mode 100644 src/nohup.c
 create mode 100755 test/nohup

diff --git a/doc/meson.build b/doc/meson.build
index befc6df..e348e9c 100644
[message trimmed]

[PATCH v3] Implement env 4 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
v2 -> v3:
    Changed test to get around potential environment consequences in the
    uname utility. Now we just use head instead.

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 58 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
 8 files changed, 186 insertions(+), 1 deletion(-)
[message trimmed]

[PATCH] Make test scripts POSIX compliant 4 months ago

From Christopher Vittal to ~sircmpwn/ctools

"." with argument is not POSIX compliant, so it must be removed.
Instead, set tool directly in the test scripts.
---
This was the checkbashims output:

possible bashism in test/cat line 2 (sourced script with arguments):
. "$HARNESS" cat

 test/basename   | 3 ++-
 test/cat        | 3 ++-
 test/chgrp      | 3 ++-
 test/chmod      | 3 ++-
 test/chown      | 3 ++-
 test/cksum      | 3 ++-
[message trimmed]

[PATCH v2] Implement env 4 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
v1 -> v2:
    Removed GNU-ism

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 57 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
 8 files changed, 185 insertions(+), 1 deletion(-)
 create mode 100644 doc/env.1.scd
[message trimmed]

[PATCH] Implement env 4 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
This is my implementation of the env command. There is still currently
one GNU-ism 'getopt(argc, argv, "+i")'. I couldn't figure out how to
process the args in the way I needed without using the '+' to tell glibc
to process the args in a POSIX compliant way.

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 58 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
[message trimmed]

[PATCH v3] Add dirname 4 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
v2 -> v3:
    Update STATUS and ctools.7 manpage

v1 -> v2:
    * Add manpage
    * Cleanup control flow

(Keeping this question since I haven't recived a reply)

There's an ambiguity I've noticed with respect to dirname '' that
I would like some input on.

From reading the algorithm specified, step 2 is:
[message trimmed]