Hello,
regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);
and I get a Input/output error? Anyone
see whats wrong here?
Thanks,
Tom.
Hello,
regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);
and I get a Input/output error? Anyone
see whats wrong here?
Thanks,
Tom.
“Tom” <pwc@ag-signs.com> wrote in message news:ao2ga5$58r$1@inn.qnx.com…
Hello,
regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?
Probably disk error on /dos/a/test
Thanks,
Tom.
Mario,
I thought that, tried it on different machines, same
thing. It errors out half way.
here is my little test:
#include <sys/stat.h>
#include <sys/wait.h>
char tmmp[100];
int ES;
int main ()
{
sprintf (tmmp, “cp /dos/a/%s %s”, “whisk1a.gc”, “/files”);
ES = system (tmmp);
return 0;
}
Tom.
----- Original Message -----
From: “Mario Charest” postmaster@127.0.0.1
Newsgroups: qdn.public.qnx4
Sent: Thursday, October 10, 2002 3:42 AM
Subject: Re: Copy file from fd0 to HD in ‘C’
“Tom” <> pwc@ag-signs.com> > wrote in message news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
\
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao3l9b$jg$1@inn.qnx.com…
“Tom” <> pwc@ag-signs.com> > wrote in message news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
\
“Thomas Freedy” <pwcag@aol.com> wrote in message
news:ao47t9$hjg$1@inn.qnx.com…
Mario,
I thought that, tried it on different machines, same
thing. It errors out half way.
Try with a different floppy
here is my little test:
#include <sys/stat.h
#include <sys/wait.hchar tmmp[100];
int ES;int main ()
{
sprintf (tmmp, “cp /dos/a/%s %s”, “whisk1a.gc”, “/files”);
ES = system (tmmp);
return 0;
}Tom.
----- Original Message -----
From: “Mario Charest” <postmaster@127.0.0.1
Newsgroups: qdn.public.qnx4
Sent: Thursday, October 10, 2002 3:42 AM
Subject: Re: Copy file from fd0 to HD in ‘C’
“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao3l9b$jg$> 1@inn.qnx.com> …“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
\
Yes,
When I do it from the shell, it works fine!
Could it be my process finishes and exits before
the copy is done? Thus teminating the system process?
Tom.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao485n$hnv$1@inn.qnx.com…
“Thomas Freedy” <> pwcag@aol.com> > wrote in message
news:ao47t9$hjg$> 1@inn.qnx.com> …
Mario,I thought that, tried it on different machines, same
thing. It errors out half way.
Try with a different floppy >here is my little test:
#include <sys/stat.h
#include <sys/wait.hchar tmmp[100];
int ES;int main ()
{
sprintf (tmmp, “cp /dos/a/%s %s”, “whisk1a.gc”, “/files”);
ES = system (tmmp);
return 0;
}Tom.
----- Original Message -----
From: “Mario Charest” <postmaster@127.0.0.1
Newsgroups: qdn.public.qnx4
Sent: Thursday, October 10, 2002 3:42 AM
Subject: Re: Copy file from fd0 to HD in ‘C’
“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao3l9b$jg$> 1@inn.qnx.com> …“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
\
“Thomas Freedy” <pwcag@aol.com> wrote in message
news:ao48so$itn$1@inn.qnx.com…
Yes,
When I do it from the shell, it works fine!
Could it be my process finishes and exits before
the copy is done? Thus teminating the system process?
Try popen instead. I just realized I don’t know if system return right away
or wait for the shell to finish running the command
Tom.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao485n$hnv$> 1@inn.qnx.com> …“Thomas Freedy” <> pwcag@aol.com> > wrote in message
news:ao47t9$hjg$> 1@inn.qnx.com> …
Mario,I thought that, tried it on different machines, same
thing. It errors out half way.
Try with a different floppy >here is my little test:
#include <sys/stat.h
#include <sys/wait.hchar tmmp[100];
int ES;int main ()
{
sprintf (tmmp, “cp /dos/a/%s %s”, “whisk1a.gc”, “/files”);
ES = system (tmmp);
return 0;
}Tom.
----- Original Message -----
From: “Mario Charest” <postmaster@127.0.0.1
Newsgroups: qdn.public.qnx4
Sent: Thursday, October 10, 2002 3:42 AM
Subject: Re: Copy file from fd0 to HD in ‘C’
“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao3l9b$jg$> 1@inn.qnx.com> …“Tom” <> pwc@ag-signs.com> > wrote in message
news:ao2ga5$58r$> 1@inn.qnx.com> …
Hello,regarding the last post. The way I thought would work
was:
system (“cp /dos/a/test /someplace/”);and I get a Input/output error? Anyone
see whats wrong here?Probably disk error on /dos/a/test
Thanks,
Tom.
\
system() waits.
But popen() is useful if you need to redirect the file descriptors from/to
the calling program.
“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ao4ks1$2fs$1@inn.qnx.com…
Try popen instead. I just realized I don’t know if system return right
away
or wait for the shell to finish running the command >