bugmake - Bugs: bug #1328, make doesn't detect failures...

 
 

bug #1328: make doesn't detect failures writing to stdout

Submitted by:  Paul D. Smith <psmith>
Submitted on:  Fri 04 Oct 2002 01:51:20 PM UTC  
 
Severity: 1 - WishItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.80Operating System: POSIX-Based
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 12 Jun 2005 10:23:29 PM UTC, comment #1:

Added an implementation of the close_stdout() function into GNU make. I didn't use the gnulib one verbatim because it pulls in lots of other gnulib infrastructure that I don't want, and also GNU make (still!) tries to be able to build with K&R C compilers.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 04 Oct 2002 01:51:20 PM UTC, original submission:

Jim Meyering <jim@meyering.net> reports:

There's a minor problem with this version of make: it doesn't detect failures when writing to stdout:

$ for i in v h p; do ./make -$i > /dev/full && echo fail -$i;done
fail -v
fail -h
fail -p

[you probably know, but on Linux, /dev/full simulates a full device]

Nearly every GNU program (except the ones I maintain -- and, now, Paul Eggert's) fail the `program --help > /dev/null' test. I.e., they fail to produce a diagnostic and erroneously exit successfully. They should do something like this:

$ cp --version > /dev/full
cp: write error: No space left on device
[Exit 1]

The way to fix GNU make is to add a single line like this near the beginning of main.c(main)

atexit (close_stdout);

Then you can use closeout.[ch] from coreutils
ftp://alpha.gnu.org/gnu/fetish/coreutils-4.5.1.tar.gz

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:01:33 AM UTCpsmithFixed Release4.0=>3.81
Sun 12 Jun 2005 10:23:29 PM UTCpsmithStatusNone=>Fixed
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0

Back to the top


Powered by Savane 3.1-cleanup1