Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: System freeze - scanning recordings ...
Am Mittwoch, 17. September 2003 22:44 schrieben Sie:
> You need to add newline characters to your printf() statements,
> as in
>
> printf("in if\n");
>
> Alternatively you could print to stderr:
>
> fprintf(stderr, "in if");
>
> which is unbuffered.
I *REALLY* should have another C/C++ primer ;) ... Sorry for the
vi-Characters, just ignore them.
Entering cRecordings::Load
Got Filepointer
in if
Ok. Here another hint while playing arround. When starting through ./runvdr I
can kill-9 it, and it respawns. When I just invoke ./vdr ... there are 2
processes:
30628 pts/4 S 0:00 ./vdr
14077 pts/4 Z 0:00 [vdr] <defunct>
30340 ? SW 0:00 [kdvb-fe-0:0]
20543 pts/4 S 0:00 ./vdr
Killing one brings
before end (from the debug output)
Killing the other brings (as exspected)
Killed
--CODE--CODE--CODE--
// --- cRecordings
-----------------------------------------------------------$
$
bool cRecordings::Load(bool Deleted)$
{$
fprintf(stderr, "Entering cRecordings::Load\n");$
Clear();$
bool result = false;$
char *cmd = NULL;$
asprintf(&cmd, FINDCMD, VideoDirectory, Deleted ? "*" DELEXT : "*" RECEXT);$
FILE *p = popen(cmd, "r");$
fprintf(stderr, "Got Filepointer\n");$
if (p) {$
fprintf(stderr, "in if\n");$
char *s;$
while ((s = readline(p)) != NULL) {$
fprintf(stderr, "in while\n");$
cRecording *r = new cRecording(s);$
if (r->Name())$
Add(r);$
else$
delete r;$
}$
pclose(p);$
Sort();$
result = Count() > 0;$
}$
else$
Interface->Error("Error while opening pipe!");$
free(cmd);$
fprintf(stderr, "before end\n");$
return result;$
}$
--
--
Viele Grüße
Thorsten Giese
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index