Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Community > Tech > [Linux] fopen() fallisce
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Hamelin
.pifferaio.magico.

User info:
Registered: Feb 2003
Posts: 662 (0.08 al dì)
Location: ..tra i monti intorno ad Hamelin..
Corso: Ingegneria Informatica
Anno:
Time Online: 7 Days, 7:19:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[Linux] fopen() fallisce

Scrivendo un piccolissimo programma in C, desideravo leggere informazioni sulla batteria da un file (in /proc/acpi): la fopen () fallisce... il problema sta nel fatto che il file è utilizzato da un altro programma (non è possibile aprirne una copia in sola lettura?)? oppure c'è qualche problema di permessi (non credo, perché ho tutti i permessi di lettura necessari... e non funza nemmeno da root)?

In sintesi. Come faccio a leggere un file nella directory /proc con un programma C o C++?!?

__________________
Bjarne Stroustrup: "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone."
Andrew S. Tanenbaum: "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."
Edsger Dijkstra: "Computer Science is no more about computers than astronomy is about telescopes."
Robert Firth: "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs."
Donald Knuth: "A mathematical formula should never be 'owned' by anybody! Mathematics belong to God."

08-11-2005 09:41
Click Here to See the Profile for Hamelin Click here to Send Hamelin a Private Message Visit Hamelin's homepage! Find more posts by Hamelin Add Hamelin to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Walter
dsy adminz

User info:
Registered: Mar 2002
Posts: 5304 (0.63 al dì)
Location: Milano 90% - Valle Camonica 10%
Corso: Magistrale in Informatica
Anno: fine!
Time Online: 99 Days, 4:19:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Hamelin
In sintesi. Come faccio a leggere un file nella directory /proc con un programma C o C++?!?

Qui c'è un articolo a riguardo.
Di che file si tratta?
Che valore assume la variabile globale errno dopo il fallimento di fopen?

__________________
"Ragione e passione sono timone e vela della nostra anima navigante." - Kahlil Gibran
"Senza musica la vita sarebbe un errore." - Friedrich Nietzsche

08-11-2005 10:18
Click Here to See the Profile for Walter Click Here to See the Blog of Walter Click here to Send Walter a Private Message Visit Walter's homepage! Find more posts by Walter Add Walter to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Hamelin
.pifferaio.magico.

User info:
Registered: Feb 2003
Posts: 662 (0.08 al dì)
Location: ..tra i monti intorno ad Hamelin..
Corso: Ingegneria Informatica
Anno:
Time Online: 7 Days, 7:19:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grazie mille! Penso mi possa risolvere il problema...

__________________
Bjarne Stroustrup: "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone."
Andrew S. Tanenbaum: "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."
Edsger Dijkstra: "Computer Science is no more about computers than astronomy is about telescopes."
Robert Firth: "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs."
Donald Knuth: "A mathematical formula should never be 'owned' by anybody! Mathematics belong to God."

08-11-2005 19:43
Click Here to See the Profile for Hamelin Click here to Send Hamelin a Private Message Visit Hamelin's homepage! Find more posts by Hamelin Add Hamelin to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Walter
dsy adminz

User info:
Registered: Mar 2002
Posts: 5304 (0.63 al dì)
Location: Milano 90% - Valle Camonica 10%
Corso: Magistrale in Informatica
Anno: fine!
Time Online: 99 Days, 4:19:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Tienici aggiornati! :D

__________________
"Ragione e passione sono timone e vela della nostra anima navigante." - Kahlil Gibran
"Senza musica la vita sarebbe un errore." - Friedrich Nietzsche

08-11-2005 19:46
Click Here to See the Profile for Walter Click Here to See the Blog of Walter Click here to Send Walter a Private Message Visit Walter's homepage! Find more posts by Walter Add Walter to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 21:08.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.102 seconds (69.35% PHP - 30.65% MySQL) con 23 query.