*** empty log message ***

svn path=/trunk/boinc/; revision=4081
This commit is contained in:
David Anderson 2004-08-20 19:52:34 +00:00
parent d3d9abe094
commit bc809de5fd
4 changed files with 27 additions and 31 deletions

View File

@ -16520,3 +16520,13 @@ David 20 Aug 2004
ops/
show_log.php
white.css (new)
David 20 Aug 2004
- removed perror()s from shmem functions.
Shouldn't do I/O at this level.
html/user/
info.php
stats.php
lib/
shmem.C

View File

@ -1,7 +1,5 @@
<?php
require_once('../inc/db.inc');
require_once('../inc/util.inc');
db_init();
page_head('Rules and Policies');
echo "
@ -26,7 +24,7 @@ and when it uses them.
<p>
The work done by your computer contributes to the
academic nonprofit research being performed by ", PROJECT, ",
goals of ", PROJECT, ",
as described on its web site.
The application programs may change from time to time.
</p>
@ -60,21 +58,26 @@ however, you can choose not to be sent these at any time.
<h3>Is it safe to run ", PROJECT, " ?</h3>
<p>
Any time you download a program through the Internet you are taking a chance: the program might have dangerous errors, or the download server might have been hacked.
Any time you download a program through the Internet you are taking a chance:
the program might have dangerous errors,
or the download server might have been hacked.
", PROJECT, " has made efforts to minimize these risks.
We have tested our applications carefully.
Our servers are behind a firewall and are configured for high security.
To ensure the safety of program downloads, all executable files are digitally signed on a secure computer not connected to the Internet.
To ensure the safety of program downloads,
all executable files are digitally signed on a secure computer
not connected to the Internet.
</p>
<p>
", PROJECT, " was developed at the University of California at Berkeley.
", PROJECT, " was developed at ".COPYRIGHT_HOLDER.".
BOINC was developed at the University of California.
</p>
<h3>Liability</h3>
<p>
", PROJECT, " and the University of California
", PROJECT, " and ".COPYRIGHT_HOLDER."
assume no liability for damage to your computer,
loss of data, or any other event or condition that may occur
as a result of participating in ", PROJECT, ".

View File

@ -1,7 +1,5 @@
<?php
require_once('../inc/db.inc');
require_once('../inc/util.inc');
db_init();
page_head('Project statistics');
echo "
@ -20,6 +18,8 @@ This data can be summarized and represented as Web pages.
Examples:
<ul>
<li>
<a href=http://www.hispaseti.org/stats/team/BOINCStats/WEB_index.php>HispaSeti & BOINC</a> (Spanish-language)
<li>
<a href=http://www.setisynergy.com/stats/index.php>BOINC Statistics for the WORLD!</a>
<li>
<a href=http://www.boinc.dk/index.php?page=statistics>http://www.boinc.dk</a>,

View File

@ -94,12 +94,9 @@ int detach_shmem(HANDLE hSharedMem, void* p) {
int create_shmem(key_t key, int size, void** pp) {
int id;
char buf[256];
assert(pp!=NULL);
id = shmget(key, size, IPC_CREAT|0777);
if (id < 0) {
sprintf(buf, "create_shmem: shmget: key: %x size: %d", (unsigned int)key, size);
perror(buf);
return ERR_SHMGET;
}
return attach_shmem(key, pp);
@ -114,15 +111,8 @@ int destroy_shmem(key_t key){
if (id < 0) return 0; // assume it doesn't exist
retval = shmctl(id, IPC_STAT, &buf);
if (retval) return ERR_SHMCTL;
if (buf.shm_nattch > 0) {
fprintf(stderr,
"destroy_shmem: %d attachments\n",
(int)buf.shm_nattch
);
}
retval = shmctl(id, IPC_RMID, 0);
if (retval) {
fprintf(stderr, "destroy_shmem: remove failed %d\n", retval);
return ERR_SHMCTL;
}
return 0;
@ -130,19 +120,14 @@ int destroy_shmem(key_t key){
int attach_shmem(key_t key, void** pp){
void* p;
char buf[256];
int id;
assert(pp!=NULL);
id = shmget(key, 0, 0);
if (id < 0) {
sprintf(buf, "attach_shmem: shmget: key: %x mem_addr: %p", (unsigned int)key, (void*)pp);
perror(buf);
return ERR_SHMGET;
}
p = shmat(id, 0, 0);
if ((long)p == ERR_SHMAT) {
sprintf(buf, "attach_shmem: shmat: key: %x mem_addr: %p", (unsigned int)key, (void*)pp);
perror(buf);
return ERR_SHMAT;
}
*pp = p;
@ -153,24 +138,22 @@ int detach_shmem(void* p) {
int retval;
assert(p!=NULL);
retval = shmdt((char *)p);
if (retval) perror("detach_shmem: shmdt");
return retval;
}
int shmem_info(key_t key) {
int print_shmem_info(key_t key) {
int id;
struct shmid_ds buf;
char buf2[256];
id = shmget(key, 0, 0);
if (id < 0) {
sprintf(buf2, "shmem_info: shmget: key: %x", (unsigned int)key);
perror(buf2);
return ERR_SHMGET;
}
shmctl(id, IPC_STAT, &buf);
fprintf( stderr, "shmem key: %x\t\tid: %d, size: %d, nattach: %d\n",
(unsigned int)key, id, buf.shm_segsz, (int)buf.shm_nattch );
fprintf(
stderr, "shmem key: %x\t\tid: %d, size: %d, nattach: %d\n",
(unsigned int)key, id, buf.shm_segsz, (int)buf.shm_nattch
);
return 0;
}