Page MenuHomeFreeBSD

Fix newvers.sh with BUILD_WITH_STRICT_TMPPATH=1
ClosedPublic

Authored by arichardson on Nov 29 2018, 10:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 4, 11:51 PM
Unknown Object (File)
Thu, Jul 2, 10:35 PM
Unknown Object (File)
Thu, Jul 2, 10:34 PM
Unknown Object (File)
Thu, Jun 25, 8:17 PM
Unknown Object (File)
Tue, Jun 23, 9:22 PM
Unknown Object (File)
Mon, Jun 8, 2:12 PM
Unknown Object (File)
Mon, Jun 8, 4:15 AM
Unknown Object (File)
Jun 6 2026, 11:49 PM
Subscribers

Details

Summary

newvers.sh runs mkfifo which did not exist before this change.
However, I didn't notice before because it is run from a function
where a missing command does cause a noticeable failure.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21258
Build 20599: arc lint + arc unit

Event Timeline

emaste added subscribers: kib, markj.

LGTM. One of either @kib or @markj suggested eliminating the mkfifo but I believe we cannot without a more capable shell.

This revision is now accepted and ready to land.Nov 29 2018, 3:19 PM

Oh huh. What's the problem with:

$git_cmd ... | while read smode ...; do
...
done

? A quick test suggests that /bin/sh does indeed support that.

Anyway, LGTM.

Oh, maybe I'm conflating a different comment with something about mkfifo, but it was in D15968. In any case, the issue is that with cmd | while ... a return in the while loop returns from the subshell, not the function. There's a decent Stack Overflow discussion at https://stackoverflow.com/questions/13726764/while-loop-subshell-dilemma-in-bash

This revision was automatically updated to reflect the committed changes.