Re: errno not restore before printing error in exec_builtin

2024-10-28 Thread Chet Ramey

On 10/27/24 7:47 PM, Emanuele Torre wrote:

In a branch of exec_builtin(), errno is not restored before printing an
error message, and that causes "Success" to be printed.


Thanks for the report. The right fix for this is to suppress the exec
builtin printing an error message in the cases where shell_execve()
prints one. There are specific return values and values of errno where
it does.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: [PATCH] Makefile: avoid undefined variables

2024-10-28 Thread Chet Ramey

On 10/26/24 5:04 PM, Mike Jonkmans wrote:

On Thu, Oct 24, 2024 at 03:07:46PM -0400, Grisha Levit wrote:

These are reported by make --warn-undefined-variables.

Most were being set previously (sometimes 20 years ago) and got left
behind in recepies after their definitions have been removed. Others
only get set in some configurations so it makes sense to prevent them
from inheriting stray values from the environment otherwise. A few are
just typos.


Good cleanup!
I see the Makefile has evolved in a good way.

...

Makefile.in
- ALLOC_FILES,GLOBC,GLOBO,LIBRARY_SOURCE: remove deprecated variables


LIBRARY_SOURCE is useful to generate tags.


Yes, and this was its original purpose, but does anyone generate tags
files besides me? (And I don't do it very often.)



E.g.
LIBRARY_SOURCE = $(SHLIB_SOURCE) $(READLINE_SOURCE) $(HISTORY_SOURCE) \
$(TERMCAP_SOURCE) $(GLOB_SOURCE) 
$(TILDE_SOURCE) \
$(MALLOC_SOURCE)


There's no reason not to include serveral of these in a declaration.
The tags files should be independent of any particular configuration.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/


OpenPGP_signature.asc
Description: OpenPGP digital signature