Hi all,
following problem:
i would set via little background proggi any ENV-vars
…sev
#include <stdio.h>
#include <time.h>
#include <env.h>
void main(void);
void main(void)
{
time_t start,now;
char buffer[80]=“00000 sec”;
int rc;
start=time(NULL);
while(1)
{
now=time(NULL);
sprintf(buffer,"%d sec",now-start);
rc=setenv(“UP_TIME”,buffer,1);
// printf("\rsetenv:%s rc:%d “,buffer,rc);
// printf (”\t\t\t getenv:%s",getenv(“UP_TIME”));
sleep(1);
}
}
…
/etc/config/sysinit.1
…
…
export UP_TIME=0
sev &
…
…
the proggi is running, but i can’t see the changing of UP_TIME
#echo $UP_TIME
if i uncomment the printf lines , i can see the setenv is the same like
getenv.
what can i do
\
Joerg Hering
Chief Developer VDR
e-mail: jhering@avecs-bergen.de
privat: hering.ruegen@t-online.de
mobile: jhering.ruegen@gmx.de
AVECS Bergen GmbH
development department
Billrothstraße 11a
D-18528 Bergen auf Rügen
Tel.: +49 3838 2119101
Fax: +49 3838 2119105
Mobile: +49 172 3896974
URL: http://www.avecs-bergen.de