Commit Graph

218 Commits

Author SHA1 Message Date
David Anderson b079d40cb9 - API, Unix: call getrusage() from the timer thread,
not the worker signal handler.
    There's no reason to call it from the signal handler -
    it returns the CPU for the entire process, not the calling thread.
    And it may be asynch-signal-handler-unsafe.
- API: comment out checks for bad CPU times.
    I don't think this is needed now, and in some cases it's wrong
    (multi-threaded apps can accumulate CPU faster than real time)
- API, Unix: in boinc_calling_thread_cpu_time(), don't retry getrusage().
- Bossa: switch to better class structure (suggested by Nicolas Alvarez).
    Haven't switched to mysqli yet, but will later.
    Also various other Bossa fixes

svn path=/trunk/boinc/; revision=13855
2007-10-16 23:02:13 +00:00
David Anderson 028544e184 - API: get rid of getrusage_mutex to synchronize calls to getrusage()
and access to worker_thread_ru.
    This was being used in the worker signal handler,
    which is bad because pthread_mutex_lock() can allocate memory.
    I don't think this matters; at worst we might get
    CPU times off by < 1 sec.

svn path=/trunk/boinc/; revision=13844
2007-10-12 19:28:30 +00:00
David Anderson fde3a60e13 - client/lib: compile fixes for OpenBSD
svn path=/trunk/boinc/; revision=13821
2007-10-10 15:57:59 +00:00
Frank Thomas fbcfeaf456 - Removed the svn:executable property from files that should not be executable,
like source code and text files. I skipped to check most files in html/
  and mac_*/ though.
- Added svn:executable to tools/watch_tcp because it has a shebang.


svn path=/trunk/boinc/; revision=13819
2007-10-10 09:25:40 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
David Anderson d302a5e107 - client/manager/API: code cleanup to disentangle sandbox code from lib/.
- move client sandbox-specific code to a new file, sandbox.C
    - remove g_use_sandbox from util.C; move to MainDocument.cpp (manager)
        and sandbox.C (client)
    - don't declare check_security() in util.h; it's not in util.C
    - don't call remove_project_owned_file_or_dir() in
        boinc_delete_file_aux() or boinc_rmdir();
        rather, at the points in the client that delete
        dirs that are usually owned by boinc_projects,
        call remove_project_owned_file_or_dir() first,
        then clean_out_dir().
    - rename boinc_exec() to switcher_exec() and move it to sandbox.C

Note: this change was sparked by needing to remove a call to getgrnam()
from boinclib, to avoid requiring the same version of glibc
on both compile and target hosts

svn path=/trunk/boinc/; revision=13784
2007-10-05 16:47:07 +00:00
David Anderson 8a423e83cb - client: fix bug where failure to get project list would result
in an empty project list file.
 - client: if failed to get project list file, retry in an hour, not immediately


svn path=/trunk/boinc/; revision=13753
2007-10-02 18:43:12 +00:00
David Anderson ab09ba8834 - graphics API: redo the code for backwards compatibility with V5 so that
at most one regular and one full-screen graphics window can be open,
    and a "hide" message kills the full-screen window if one exists,
    else a regular window.
    Keep track of the PIDs separately for regular and full-screen.
    Also, don't send a "hide" ack if we don't do graphics.

svn path=/trunk/boinc/; revision=13697
2007-09-28 04:23:34 +00:00
David Anderson 7bdacec895 - API: debug the code for handling V5 graphics messages
in a V6 app (and launching/killing the graphics app)
	- API: start timer thread even if in standalone mode
		(needed to get timer callbacks for V6 graphics)
	- API: remove BOINCSetForegroundWindow stuff
	- API: call DestroyWindow instead of boinc_exit() in WM_CLOSE.
		boinc_exit() is the wrong thing to call - e.g. it tries to delete
		the lock file, resulting in a 5-sec delay on exit

svn path=/trunk/boinc/; revision=13679
2007-09-27 03:34:27 +00:00
David Anderson c0c6cf779d - file upload handler:
in get_file_size() RPC, check if volume has < 1MB available space
    and if so return transient error.
    This prevents client from trying upload,
    which apparently sends entire file even if
    handler fails at the beginning
- API, Win: remove use of GetTickCount(); use dtime() instead
- use new BOINC logo in sample project home page

svn path=/trunk/boinc/; revision=13574
2007-09-12 08:25:22 +00:00
Charlie Fenton 902b5a4597 Fx a compiler warning
svn path=/trunk/boinc/; revision=13545
2007-09-05 11:12:32 +00:00
David Anderson dabba949a4 - client: when a job finishes, read last (not first) 63KB of stderr
- client: parse <cpid_time> in scheduler reply;
        add cpid_time field to PROJECT.
        This defaults to the user_create_time.
        In deciding which CPID to send in a scheduler request,
        use the one with oldest cpid_time (not user_create_time).
        This is the client half of fixing a bug that causes
        CPID to flip/flop between to values in a certain case.

svn path=/trunk/boinc/; revision=13531
2007-09-03 23:00:22 +00:00
David Anderson 9debbe3b4f screensaver fix
svn path=/trunk/boinc/; revision=13395
2007-08-16 23:52:40 +00:00
Rom Walton 05cee3eb0d - SCR: Fix the new screensaver so that it doesn't start a new
graphics window every second.
    - LIB: CreateProcess always returns a 1 on success, which means
           the last part of the run_program function was never being
           executed.
    
    clientscr/
        screensaver_win.cpp
    lib/
        util.C

svn path=/trunk/boinc/; revision=13323
2007-08-15 15:25:52 +00:00
David Anderson e1a0c552e2 - compile fixes for Win
client/
		acct_setup.C
		cs_prefs.C
		cs_trickle.C
	lib/
		filesys.C
		str_util.C,h
		util.C,h
	tools/
		updater.C
	win_build/
		sim.vcproj

svn path=/trunk/boinc/; revision=12985
2007-06-22 20:17:08 +00:00
David Anderson 7b74befedc - client: when you read a file into a string with:
loop
            read a line X
            S += X
    it performs real bad if the file is large
    (allocation of std::string seems to stupid)
    So I changed this to
        find file size n
        read file into malloced buf size n
        S = buf
        free buf
- lib: moved functions to appropriate file
        
client/
    acct_setup.C
    cs_prefs.C
lib/
    parse.C,h
    str_util.C,h
    util.C,h

svn path=/trunk/boinc/; revision=12983
2007-06-22 18:53:55 +00:00
David Anderson 6b4e912b27 - random compile warning fixes
client/
    auto_update.C
    file_names.h
    scheduler_op.C
    time_stats.C
lib/
    util.C,h
tools/
    create_work.C
    updater.C

svn path=/trunk/boinc/; revision=12971
2007-06-20 23:16:30 +00:00
David Anderson f5d94818dd - added "census", a program that counts up how much RAC
there is for each HR class, and writes it to a file.
    This will be used soon for HR support in the feeder.
- split the HR code into hr.C,h (stuff used by both census and scheduler)
    and sched_hr.C (stuff used only by the scheduler)
- database: change DB_CREDITED_JOB to treat workunitid
    as a double (which it is) rather than a long.
    BTW, long == int.
- fixed lots of compile warnings in the server code

db/
    boinc_db.C,h
lib/
    boinc_cmd.C
    miofile.C
    util.C
sched/
    Makefile.am
    census.C (new)
    feeder.C
    file_deleter.C
    file_upload_handler.C
    handle_request.C
    hr.C,h (new)
    main.C
    sample_assimilator.C
    sample_work_generator.C
    sched_array.C
    sched_hr.C,h
    sched_send.C
    server_types.C
    transitioner.C
    validator.C

svn path=/trunk/boinc/; revision=12970
2007-06-20 22:34:06 +00:00
David Anderson 55a060a003 - manager: v6 graphics fixes.
Works now, with a few problems

	clientgui/
		ViewWork.cpp
	lib/
		util.C

svn path=/trunk/boinc/; revision=12966
2007-06-20 03:35:16 +00:00
David Anderson b7fad32d14 svn path=/trunk/boinc/; revision=12960 2007-06-19 15:46:53 +00:00
David Anderson 90374052f2 - debug version 6-style graphics on Windows.
New example app works now!

	api/
		graphics2.C,h
		graphics2_util.C
		graphics2_win.C
	lib/
		util.C,h

svn path=/trunk/boinc/; revision=12735
2007-05-23 21:02:19 +00:00
David Anderson f3f11e7b81 svn path=/trunk/boinc/; revision=12403 2007-04-17 18:55:20 +00:00
David Anderson c276918e96 *** empty log message ***
svn path=/trunk/boinc/; revision=12334
2007-04-09 15:40:37 +00:00
David Anderson 11869bc0be *** empty log message ***
svn path=/trunk/boinc/; revision=12333
2007-04-09 02:17:26 +00:00
David Anderson 52793262e1 *** empty log message ***
svn path=/trunk/boinc/; revision=12257
2007-03-20 23:12:22 +00:00
David Anderson aacfe0c952 *** empty log message ***
svn path=/trunk/boinc/; revision=12255
2007-03-20 19:55:53 +00:00
David Anderson 81effa6a7b *** empty log message ***
svn path=/trunk/boinc/; revision=12127
2007-02-21 16:26:51 +00:00
David Anderson 6a10211584 *** empty log message ***
svn path=/trunk/boinc/; revision=11960
2007-01-24 22:55:00 +00:00
David Anderson eba028a27d *** empty log message ***
svn path=/trunk/boinc/; revision=11946
2007-01-23 22:29:19 +00:00
David Anderson 420e00f137 *** empty log message ***
svn path=/trunk/boinc/; revision=11860
2007-01-15 19:25:23 +00:00
David Anderson 3967a1f924 *** empty log message ***
svn path=/trunk/boinc/; revision=11850
2007-01-12 17:42:29 +00:00
David Anderson 19785132bc *** empty log message ***
svn path=/trunk/boinc/; revision=11712
2006-12-21 16:56:33 +00:00
David Anderson 017927ba8c *** empty log message ***
svn path=/trunk/boinc/; revision=11700
2006-12-19 20:49:12 +00:00
Charlie Fenton e6df893bd9 *** empty log message ***
svn path=/trunk/boinc/; revision=11684
2006-12-15 05:57:13 +00:00
David Anderson 46695c2155 *** empty log message ***
svn path=/trunk/boinc/; revision=11683
2006-12-14 20:44:39 +00:00
David Anderson cda05f82b5 *** empty log message ***
svn path=/trunk/boinc/; revision=11681
2006-12-14 18:15:22 +00:00
David Anderson 86ad19ce5f *** empty log message ***
svn path=/trunk/boinc/; revision=11672
2006-12-14 00:42:43 +00:00
David Anderson e9a0efd06d *** empty log message ***
svn path=/trunk/boinc/; revision=11562
2006-11-22 03:23:38 +00:00
Eric J. Korpela 9e924706a0 New functions remove_duplicate_words(char * or string &). Removes duplicate
words from a space or comma delimited string.  Returns a space delimited string.
(i.e.  "this is this a is test" -> "this is a test").

svn path=/trunk/boinc/; revision=11194
2006-09-26 16:22:36 +00:00
Bruce Allen eaf9e196bb For computing and tracking a host's average credit/cpu_time I
have inserted a new averaging function
update_credit_per_cpu_sec() into lib/util.C.  This function
should be called from validator.C, and then the value of
credit_per_cpu_sec should be exported by db_dump.C in the
host_id.gz stats file.

David, Eric, if you could check the code and logic here I would
be grateful.  I won't modify validator.C or db_dump.C until
we've agreed on this.

svn path=/trunk/boinc/; revision=11134
2006-09-10 22:10:08 +00:00
David Anderson b86bd36cf6 *** empty log message ***
svn path=/trunk/boinc/; revision=11082
2006-09-01 22:21:20 +00:00
David Anderson 7ce1144b73 *** empty log message ***
svn path=/trunk/boinc/; revision=11076
2006-09-01 21:06:30 +00:00
David Anderson 366c9f272c *** empty log message ***
svn path=/trunk/boinc/; revision=11048
2006-08-31 18:31:28 +00:00
David Anderson baae07da72 *** empty log message ***
svn path=/trunk/boinc/; revision=11034
2006-08-29 18:18:36 +00:00
Charlie Fenton d4eb510bc8 *** empty log message ***
svn path=/trunk/boinc/; revision=10815
2006-08-02 00:43:27 +00:00
Rom Walton dfc2cdb4b6 *** empty log message ***
svn path=/trunk/boinc/; revision=10805
2006-08-01 16:09:41 +00:00
David Anderson 986e2e5047 *** empty log message ***
svn path=/trunk/boinc/; revision=10665
2006-07-18 01:46:55 +00:00
David Anderson 0101a1ae63 *** empty log message ***
svn path=/trunk/boinc/; revision=10505
2006-06-23 20:05:12 +00:00
Eric J. Korpela c2b585ade9 Protected the getrusage call in boinc_calling_thread_cpu_time() with the
same mutex used in boinc_api.C

svn path=/trunk/boinc/; revision=10358
2006-06-15 18:19:06 +00:00
David Anderson f5ce6cacff sandbox
svn path=/trunk/boinc/; revision=10310
2006-06-12 04:05:10 +00:00