Hi,
here is two little patch (for the 32bits version)
The first one will set the priority to the lowest avaible one. I use a
#ifdef _linux_ so
just modify it for other system (it seems that IRIX and Solaris system
also hace
setpriority and getpriority functions).
The change 'Saving state to saved.state.' to
'Saving state to saved.state at: Thu Jan 13 13:25:38 2000'. So the log
file will show if the client is still running and/or when it was
shutdown.
Laurent
*** ecdl2K-108.32bit.c Mon Dec 13 21:20:58 1999
--- ecdl2K-108.32bit_nice.c Wed Jan 5 15:25:47 2000
***************
*** 967,972 ****
--- 967,977 ----
/** Lower our priority (under Unix, this is done by the shell) */
+ #ifdef __linux__
+ setpriority(PRIO_PROCESS,getpid(),19);
+ printf("Running with priority %d.\n",getpriority(PRIO_PROCESS,getpid()));
+ #endif
+
#ifdef _WIN32
SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
#endif
*** ecdl2K-108.32bit_orig.c Thu Jan 6 10:46:07 2000
--- ecdl2K-108.32bit.c Tue Jan 11 08:48:02 2000
***************
*** 3535,3543 ****
( u64 *itersT, u128 *uT, u128 *vT, poly128 *xT, poly128 *yT
) {
FILE *handle;
- puts("Saving state to " SAVED_STATE_FILENAME ".");
handle = fopen(SAVED_STATE_FILENAME, "wb");
if (handle) {
uint i;
--- 3535,3546 ----
( u64 *itersT, u128 *uT, u128 *vT, poly128 *xT, poly128 *yT
) {
FILE *handle;
+ time_t now;
+ now = time(NULL);
+ if(now == -1) printf("Saving state to " SAVED_STATE_FILENAME ".");
+ else printf("Saving state to " SAVED_STATE_FILENAME " at: %s",ctime(&now));
handle = fopen(SAVED_STATE_FILENAME, "wb");
if (handle) {
uint i;
This archive was generated by hypermail 2b29 : Thu Jan 13 2000 - 13:32:30 MET