History log of /src/usr.bin/lam/Makefile (Results 1 – 21 of 21)
Revision Date Author Comments
# 6a9452c8 14-Nov-2025 Kyle Evans <kevans@FreeBSD.org>

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another op

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile. However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.

This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing. If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.

Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.

Minor style adjustment for the previous commit while we're here.

Reported by: cperciva
Discussed with: jrtc27
Reviewed by: des, jlduran
Fixes: 4472fd66d006 ("lam: fail on I/O errors")
MFC after: 3 days (tentative)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53750

show more ...


# e9ac4169 15-Jul-2024 Warner Losh <imp@FreeBSD.org>

Remove residual blank line at start of Makefile

This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a pe

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 6a9452c8 14-Nov-2025 Kyle Evans <kevans@FreeBSD.org>

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another op

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile. However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.

This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing. If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.

Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.

Minor style adjustment for the previous commit while we're here.

Reported by: cperciva
Discussed with: jrtc27
Reviewed by: des, jlduran
Fixes: 4472fd66d006 ("lam: fail on I/O errors")
MFC after: 3 days (tentative)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53750

show more ...


# e9ac4169 15-Jul-2024 Warner Losh <imp@FreeBSD.org>

Remove residual blank line at start of Makefile

This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a pe

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 91bd71d2 08-Feb-2002 Mark Murray <markm@FreeBSD.org>

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


# b5b9b430 06-Aug-2001 Mike Barcroft <mike@FreeBSD.org>

Constify, staticize, and set WARNS=2.

MFC after: 3 days


# 9b50d902 27-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources


# 6a9452c8 14-Nov-2025 Kyle Evans <kevans@FreeBSD.org>

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another op

lam: fix using stdin more than once

Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile. However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.

This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing. If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.

Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.

Minor style adjustment for the previous commit while we're here.

Reported by: cperciva
Discussed with: jrtc27
Reviewed by: des, jlduran
Fixes: 4472fd66d006 ("lam: fail on I/O errors")
MFC after: 3 days (tentative)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53750

show more ...


# e9ac4169 15-Jul-2024 Warner Losh <imp@FreeBSD.org>

Remove residual blank line at start of Makefile

This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a pe

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 91bd71d2 08-Feb-2002 Mark Murray <markm@FreeBSD.org>

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


# b5b9b430 06-Aug-2001 Mike Barcroft <mike@FreeBSD.org>

Constify, staticize, and set WARNS=2.

MFC after: 3 days


# 9b50d902 27-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources


# 91bd71d2 08-Feb-2002 Mark Murray <markm@FreeBSD.org>

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


# b5b9b430 06-Aug-2001 Mike Barcroft <mike@FreeBSD.org>

Constify, staticize, and set WARNS=2.

MFC after: 3 days


# 9b50d902 27-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources