Question about nALFS' file logging functions

Neven Has haski at sezampro.yu
Wed Oct 9 12:59:17 PDT 2002


On Wed, Oct 09, 2002 at 01:25:49PM -0600, Gerard Beekmans wrote:
> Come to think of it, when manually logging installations without ALFS
> the script I use has a "sleep 1" in it after which I start an
> installation to prevent just this (so if I just would've thought for
> one second for myself I'd have figured it out too).
> 
> I'd like this to become default behaviour, at least in the version of
> nALFS I run here. Where would I insert a sleep 1 type routine in the
> nALFS source code. Unless you plan to make it default too but I'm not
> getting my hopes up ;) I would however appreciate some help as I have
> no clue really how to go about it (I just don't have the resources to
> play around with the nALFS source code).

I've attached a patch. Haven't tested it, but it should work.


Neven
-------------- next part --------------
===== src/config.h 1.44 vs edited =====
--- 1.44/src/config.h	Mon Oct  7 22:55:06 2002
+++ edited/src/config.h	Wed Oct  9 21:56:18 2002
@@ -47,6 +47,12 @@
 #define MARKS_IN_COLOR
 
 
+/* Sleep for one second after getting the time stamp (in one-find
+ * method of logging files). Needed for some very "fast packages".
+ */
+#define SLEEP_AFTER_TIME_STAMP
+
+
 /* Annoying, but it can be useful if you're reading newspapers. */
 // #define BEEP_WHEN_DONE
 
===== src/logging.c 1.31 vs edited =====
--- 1.31/src/logging.c	Sat Oct  5 04:00:18 2002
+++ edited/src/logging.c	Wed Oct  9 21:45:09 2002
@@ -430,6 +430,9 @@
 		if (time_stamp == -1) {
 			pstatus(COL_INF, "Creating new time stamp.");
 			time_stamp = time(NULL);
+#ifdef SLEEP_AFTER_TIME_STAMP
+			sleep(1);
+#endif
 		} else {
 			pstatus(COL_INF, "Using the existing time stamp.");
 		}


More information about the alfs-discuss mailing list