Search Results

Search: Posts Made By: Loic Domaigne
Forum: Programming 06-18-2011
6,222
Posted By Loic Domaigne
Hi Luke, I didn't spend much time with...
Hi Luke,


I didn't spend much time with your program, but it occured to me that these lines look rather suspicious:

for( i = u; i < G->nv; i++ )
if( i + 1 < G->nv ) G->adj[i] =...
Forum: Programming 05-27-2011
1,667
Posted By Loic Domaigne
Something around those lines: #!/usr/bin/env...
Something around those lines:

#!/usr/bin/env python
import os

# assume we got the list from somewhere
list = ["apple", "oranges", "pears", "grapes"]

for fruit in list:
...
7,409
Posted By Loic Domaigne
Any reason for not using standard blocking mode? ...
Any reason for not using standard blocking mode?



I can't quite follow. If only 1080 has been sent, I don't think that read() returns 2464 bytes...


You need to handle partial read anyway...
Forum: Programming 05-12-2011
1,677
Posted By Loic Domaigne
I'm glad that I won't end-up maintaining your...
I'm glad that I won't end-up maintaining your code...

I played with it a bit, took me some time to get the client working without crash:

- A Pthread_attr_init is missing for rx (Client.c:218)...
Forum: Programming 05-10-2011
2,863
Posted By Loic Domaigne
I guess, my previous example shows how to do it: ...
I guess, my previous example shows how to do it:
- it creates an empty map
- it fills the map step by step as the number are entered (until a negative number is given for stop).
- for the entered...
Forum: Programming 05-05-2011
4,553
Posted By Loic Domaigne
Are you working on Linux? If so, can you run your...
Are you working on Linux? If so, can you run your program under valgrind supervision?
Forum: Ubuntu 05-03-2011
10,582
Posted By Loic Domaigne
Glad that you solve the problem ;-) Sometimes,...
Glad that you solve the problem ;-) Sometimes, it's better to (re)start from scratch...

Cheers, Loïc
Forum: Ubuntu 05-03-2011
10,582
Posted By Loic Domaigne
Just fun for, you may want to create the dhcp3...
Just fun for, you may want to create the dhcp3 directory (with appropriate access right) under /usr/local/var/lib/dhcp3/ and check if that's do it.
drwxr-xr-x 2 root root 12288...
Forum: Programming 05-03-2011
2,322
Posted By Loic Domaigne
Your client should select the socket for read...
Your client should select the socket for read events.
- as soon as the answer from the server is received, select shall return and you may further process, or
- select shall block until the...
Forum: Ubuntu 05-03-2011
10,582
Posted By Loic Domaigne
AFAICS, dhcp seems to work as you obtain the IP...
AFAICS, dhcp seems to work as you obtain the IP address 10.70.29.178 from our server 10.70.31.252.

I am a bit surprised however that - once NetworkManager obtains the IP - it does not continue...
Forum: Programming 04-29-2011
1,637
Posted By Loic Domaigne
I answered your question previously: - the...
I answered your question previously:
- the value at the memory location gets changed.
- when the compiler sees the variable "i", it replaces it directly by "10" (it's OK to do so, since it is a...
Forum: Ubuntu 04-28-2011
10,582
Posted By Loic Domaigne
Any suspicious entries in dmesg,...
Any suspicious entries in dmesg, /var/log/messages or /var/log/daemon.log?
Forum: Programming 03-20-2011
2,157
Posted By Loic Domaigne
Every thread has its own stack. Hence, in your...
Every thread has its own stack. Hence, in your example, i and j would be hence "private to the threads" and thus their local variables "would not conflict".

Of course, if another thread happens to...
Forum: Programming 01-06-2011
9,107
Posted By Loic Domaigne
Good Evening, Let's go to the core...
Good Evening,



Let's go to the core question as it's near bed time ;)

From a pure POSIX standpoint, if we want to get the "parent thread id" (the term "parent thread" is BTW is misnomer...
Forum: Programming 12-22-2010
5,635
Posted By Loic Domaigne
Good evening, Theoretically, there is no...
Good evening,


Theoretically, there is no any life time period imposed on a created thread. Practically, the performance may degrade over the time or your process terminates because of...
Forum: Programming 12-07-2010
5,785
Posted By Loic Domaigne
I should probably devote some times and write a...
I should probably devote some times and write a nice article about it on my blog. But, as you surely know, time is a scare resource... so I will merely copy-paste the most important point of a...
3,987
Posted By Loic Domaigne
Try ps -fp 17970 ( this assumes that your...
Try
ps -fp 17970
( this assumes that your 'perl' process that hogs the CPU is 17970 as given in your example). You should then find out the guilty script.

Loïc
Forum: Red Hat 11-20-2010
3,302
Posted By Loic Domaigne
Because browser are not reputedly secure, that is...
Because browser are not reputedly secure, that is subject to exploits. If your browser runs with root privileges, then the exploit can easily gain control over the machine where the browser runs. (...
Forum: Programming 11-19-2010
5,635
Posted By Loic Domaigne
The original APUE from Steven's has been reworked...
The original APUE from Steven's has been reworked by Rago, which gave birth the APUE 2nd edition, see APUE2e (http://www.apuebook.com/). This book is good, no point.

The most recent and...
Forum: Red Hat 11-17-2010
3,302
Posted By Loic Domaigne
Does the same behavior occur if you're browsing...
Does the same behavior occur if you're browsing as a regular user? Running a browser with root privileges might not be the best idea, BTW.

Cheers.
Loïc.
Forum: Programming 11-14-2010
5,702
Posted By Loic Domaigne
Dear Lixiao, start studying and writing your...
Dear Lixiao,

start studying and writing your 'hello world' client/server, see for instance Programming IP Sockets on Linux, Part One (http://gnosis.cx/publish/programming/sockets.html) . Then...
Forum: Programming 11-12-2010
5,596
Posted By Loic Domaigne
I don't know if that could help: Cheers, ...
I don't know if that could help:


Cheers,
Loïc
Forum: Programming 11-09-2010
6,816
Posted By Loic Domaigne
Two ideas that comes to my mind: why should...
Two ideas that comes to my mind:

why should the runX be run with the priviledges of OtherUser. If the reason is because of files permissions, a better solution could involve putting User and...
Forum: Programming 02-27-2010
6,418
Posted By Loic Domaigne
Yes, you should use mutex. volatile alone (along...
Yes, you should use mutex. volatile alone (along with atomic operation) is not enough to guarantee correctness in multi-threaded program. The magic word here is: memory visibility. Interested readers...
Showing results 1 to 24 of 24

 
All times are GMT -4. The time now is 08:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy