Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Oleg Goldshmidt wrote: Oleg Goldshmidt <[EMAIL PROTECTED]> writes: I stand by my posting so far. Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's "Effective C++" confirms what I wrote: temps are co

Re: child setitimer() alarm() doesn't work.

2005-01-30 Thread guy keren
On Sun, 30 Jan 2005, David Harel wrote: > #include > > #include > #include > > #include > > void sigalrmHandler(int gotsig) > { > kill(getppid(), SIGUSR1); > alarm(2); > } > > int main(int argc, char ** argv) > { > alarm(2); > signal(SIGALRM, sigalrmHandler); a-ha! and since when do

Re: ls doesn't return on /var/www/html

2005-01-30 Thread David Suna
Interestingly, when I ran strace on ls it returned immediately. I tried piping ls into more and it returned immediately also. Finally, I switched from my X session to a console and tried ls /var/www/html. While it also hung, when I broke out of it via Ctrl-C I got an error message about smb_

child setitimer() alarm() doesn't work.

2005-01-30 Thread David Harel
Hi, I have a server process that creates a child process. The server process receives SIGUSR1 from the child process. The child exec an executable that has either setitimer() or alarm() (I tried both) and a signal handler that sends SIGUSR1 to the server. If the parent doesn't receive SIGUSR1, i

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Oleg Goldshmidt <[EMAIL PROTECTED]> writes: > I stand by my posting so far. Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's "Effective C++" confirms what I wrote: temps are const, and for the reasons I

[OT] Interesting consulting "howto"

2005-01-30 Thread Lior Kesos
Although this was refrenced in slashdot - I found this article an interesting and potentially valuable read... There are several existing consultants in this list and alot of future consultants wannabe's (like me) so this may intrest that crowd ... http://www.unixwiz.net/techtips/be-consultant.htm

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Shachar Shemesh <[EMAIL PROTECTED]> writes: > Oleg Goldshmidt wrote: > > >Hi Shachar, > > > >Compilers generate const temporaries to prevent accidental passing of > >such a temporary to a function that would be able to modify its > >argument. If that were allowed the programmer would be surprized

Re: reiserfs mass recovery

2005-01-30 Thread Amir Yalon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At last, I have time to post again. Thanks, Ira, for the little advices. And thanks to all the other guys for making fun of Ira's single luser, it cheered me up a bit. Ira Abramov wrote: | Quoting Amir Yalon, from the post of Wed, 19 Jan: | |>Hello agai

Re: ls doesn't return on /var/www/html

2005-01-30 Thread William Sherwin
>>On a different topic, what is the recommended way for keeping a RedHat 9 >>system up to date? > > > Check out http://fedoralegacy.org/ > > If I'm not mistaken, though, they don't support Redhat 9 any more. > You should seriously consider upgrading (to Fedora Core 3, probably). > Another po

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Oleg Goldshmidt wrote: Hi Shachar, Compilers generate const temporaries to prevent accidental passing of such a temporary to a function that would be able to modify its argument. If that were allowed the programmer would be surprized because only the compiler-generated temporary would be modified,

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Shachar Shemesh <[EMAIL PROTECTED]> writes: > Hi all, > > Here is a small program for your viewing pleasure: > > > class a { > > public: > > explicit a(int param); > > > > a &operator= ( a &that ); > > }; > > > > int main() > > { > > a var1(3); > > > > var1=a(5); > > > > retu

[HAIFUX LECTURE]SNMP and OpenNMS by Zeev Halevi

2005-01-30 Thread Orna Agmon
Next Monday (31/1/2005), 18:30, the Haifa Linux Club will once again meet to hear Zeev Halevi talk about: SNMP and OpenNMS Hebrew Abstract available from http://haifux.org/lectures/118/snmp.html Abstract First hour will be a technical review of SNMP: SNMP: Simple Network Manageme

Re: problem with implementing mmap

2005-01-30 Thread Eran Tromer
On 30/01/05 18:56, Muli Ben-Yehuda wrote: If you use remap_page_range (e.g., via /dev/mem) to mmap a physical address that's valid and unreserved (i.e., all of "normal" memory), it fails silently: the PTE is allocated but left marked as not present (see mm/memory.c/remap_pte_range). So far it s

Re: problem with implementing mmap

2005-01-30 Thread Muli Ben-Yehuda
On Sun, Jan 30, 2005 at 05:38:07PM +0200, Eran Tromer wrote: > "Some peculiarities" indeed! I *am* practicing the art of understatement ;-) > If you use remap_page_range (e.g., via > /dev/mem) to mmap a physical address that's valid and unreserved (i.e., > all of "normal" memory), it fails si

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Shachar Shemesh wrote: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); a &operator= ( a &that ); }; int main() { a var1(3); var1=a(5); return 0; } Somewhat surprisingly, this does not compile: g++ -Wall -gtestcompile.cc -o

Re: problem with implementing mmap

2005-01-30 Thread Ilan Finci
Thanks all for the help. I've tried before to replace the MAP_PRIVATE to MAP_SHARED, but then the memory is mapped to 0x, and accessing the memory address later fails with segmentation fault (since when I add 0x24, it yields a pointer to 0x0023) Using the nopage operation, go me to

Re: ls doesn't return on /var/www/html

2005-01-30 Thread Omer Zak
On Sun, 2005-01-30 at 17:37 +0200, David Suna wrote: > I have a RedHat 9 system. Everything seems to be working fine. I tried > to do an ls /var/www/html and the command hangs. Doing the same on other > directories is fine. I assume that some process has the directory open > which is why the

Re: ls doesn't return on /var/www/html

2005-01-30 Thread Nadav Har'El
On Sun, Jan 30, 2005, David Suna wrote about "ls doesn't return on /var/www/html": > I have a RedHat 9 system. Everything seems to be working fine. I tried > to do an ls /var/www/html and the command hangs. Doing the same on other > directories is fine. I assume that some process has the dir

Re: problem with implementing mmap

2005-01-30 Thread Gilad Ben-Yossef
Shachar Shemesh wrote: Gilad Ben-Yossef wrote: No. What makes a block device a block device is that the actions done on it (rad/write etc) go through the buffer cache. I'm willing to be that the memory area in question is used to communicate with some card/DSP/chip and the last thing Ilan want i

[OT] Looking for Open Source Trainers

2005-01-30 Thread Gabor Szabo
We are looking for trainers for various Open Source technologies. Background -- Some of you might know me. Besides trying to herd the Israeli Perl Mongers I am also running a small training company called Perl Training Israel. http://www.pti.co.il/ I used to focus on teaching Perl at var

Re: C++ problem

2005-01-30 Thread Alex Vinokur
"Alex Vinokur" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] > Foo(5) is constant Sorry, Foo(5) is not constant. Here is an example. -- foo.cpp -- #include using namespace std; struct Foo { int var_; Foo(int var_i) : var_ (var_i) {} const Foo& operator= (const

Re: problem with implementing mmap

2005-01-30 Thread Eran Tromer
On 30/01/05 16:50, Muli Ben-Yehuda wrote: remap_page_range has some peculiarities. In particular, are you setting the pages you are mapping to PageReserved first? "Some peculiarities" indeed! If you use remap_page_range (e.g., via /dev/mem) to mmap a physical address that's valid and unreserved

ls doesn't return on /var/www/html

2005-01-30 Thread David Suna
I have a RedHat 9 system. Everything seems to be working fine. I tried to do an ls /var/www/html and the command hangs. Doing the same on other directories is fine. I assume that some process has the directory open which is why the ls is hanging. I tried restarting httpd but that didn't he

Re: problem with implementing mmap

2005-01-30 Thread Shachar Shemesh
Gilad Ben-Yossef wrote: No. What makes a block device a block device is that the actions done on it (rad/write etc) go through the buffer cache. I'm willing to be that the memory area in question is used to communicate with some card/DSP/chip and the last thing Ilan want is to cache access to t

Re: problem with implementing mmap

2005-01-30 Thread Gilad Ben-Yossef
Shachar Shemesh wrote: Ilan Finci wrote: So, I have a char device, which is registered OK, open OK, have couple of IOCTLs (for some other stuff I need there), and everything works just fine. Probably unrelated to your problem, but shouldn't it be a block device? No. What makes a block device a b

Re: problem with implementing mmap

2005-01-30 Thread Gilad Ben-Yossef
Ilan Finci wrote: Calling mmap from the user application returns an address, but trying to access this address, yields an error message: do_wp_page: bogus page at address 30027024 (page 0xc23358e0) VM: killing process testSram (0x30027000 is the address that mmap returned, and I tried to access

Re: problem with implementing mmap

2005-01-30 Thread Muli Ben-Yehuda
On Sun, Jan 30, 2005 at 12:48:27PM +0200, Ilan Finci wrote: > Then I've implemented the mmap function, using "remap_page_range", > everything seems to be working fine (I've checked all returned codes to > be sure, both in the driver, and in the user space application. remap_page_range has some

Re: problem with implementing mmap

2005-01-30 Thread Muli Ben-Yehuda
On Sun, Jan 30, 2005 at 01:12:24PM +0200, Shachar Shemesh wrote: > Ilan Finci wrote: > > >So, I have a char device, which is registered OK, open OK, have couple > >of IOCTLs (for some other stuff I need there), and everything works > >just fine. > > Probably unrelated to your problem, but shoul

Re: C++ problem

2005-01-30 Thread Alex Vinokur
"Shachar Shemesh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > Here is a small program for your viewing pleasure: > > > class a { > > public: > > explicit a(int param); > > > > a &operator= ( a &that ); > > }; > > > > int main() > > { > > a var1(3); > > > >

Re: problem with implementing mmap

2005-01-30 Thread Shachar Shemesh
Ilan Finci wrote: So, I have a char device, which is registered OK, open OK, have couple of IOCTLs (for some other stuff I need there), and everything works just fine. Probably unrelated to your problem, but shouldn't it be a block device? Shachar -- Shachar Shemesh Lingnu Open Source Co

Re: C++ problem

2005-01-30 Thread Alex Vinokur
"Shachar Shemesh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm wondering WHY temporary implicit variables > should be considered const. It's clear that the compiler does consider > them like that. [snip] See http://groups-beta.google.com/group/comp.lang.c++/browse_frm/thread/

problem with implementing mmap

2005-01-30 Thread Ilan Finci
Hi, I've tried goodle, and reading as many manuals and books I've found, but I still seems to miss something. So, and help or a pointer to the right guide will be great. We have a customized board, with a PPC cpu (MPC 5200 from Motorola), that I've ported both U-Boot and linux to work with (li

Re: Sorry, I forgot about copy constructor (was: Re: C++ problem)

2005-01-30 Thread Alex Vinokur
"Omer Zak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Replying to myself, because I forgot one more point: > From what I remember about C++, you need also a copy constructor in this > case, In this case a copy constructor is not invoked. > because you strive to copy a value to

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Omer Zak wrote: On Sat, 29 Jan 2005, Shachar Shemesh wrote: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); What is the meaning of 'explicit' declaration? Is this a C++ keyword which was added since I learned C++? Explicit means