On Wed, 02 Dec 2009 15:19:05 +0000
Tim Retout <[email protected]> wrote:

> reopen 558381
> retitle 558381 multitail: Assertion failure when file does not exist
> severity 558381 minor
> thanks
> 
> (Let's try this again, you all suck, etc.)
> 
> Thomas: Please send your patch for this bug.

See attached patch:  mulitail-no-assert-on-missing-file.patch

I originally wrote this ages ago, haven't tried it against current
multitail sources though.

-- 
Thomas Adam
Senior Developer

SmoothWall Ltd
1 John Charles Way
Leeds LS12 6QA
United Kingdom

1 800 959 3760     (USA, Canada and North America)
0870 1 999 500     (United Kingdom)
+44 870 1 999 500  (All other countries)

SmoothWall is registered in England: 4298247

This email and any attachments transmitted with it are confidential
to the intended recipient(s) and may not be communicated to any
other person or published by any means without the permission of
SmoothWall Limited.  Any opinions stated in this message are solely
those of the author.  See: http://smoothwall.net/company/email.php
for the full text of this notice.
--- multitail-5.1.2/cmdline.c	2009-06-29 10:39:38.000000000 +0100
+++ /global/users/thomas/cmdline.c	2009-06-29 10:41:13.000000000 +0100
@@ -996,7 +996,13 @@
 			/* see if file exists */
 			if (check_interval == 0 && is_cmd == 0 && is_stdin == 0 && is_sock == 0 && retry == 0 && stat64(dummy, &buf) == -1)
 			{
-				error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Error opening file %s.\n", dummy);
+				/* TA:  (2009/06/29):  Is this really necessary?  Seems a
+				 * bit drastic.  Changing it to a fprintf/exit clause.
+				 */
+				/*error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Error opening file %s.\n", dummy);*/
+
+				fprintf(stderr, "Couldn't find file:  %s -- Quitting.\n", dummy);
+				exit (EXIT_FAILURE);
 			}
 
 			/* init. struct. for this file */

Reply via email to