|
Home > Archive > Unix questions > October 2005 > exec
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| friend.05@gmail.com 2005-10-27, 2:48 am |
| I making a program in C.
I want to read a file using "od -c" command, I was trying to use exec
for the same.
But I don't have much idea about exec. Can anyone suggest how to use
for od command and also of six exec function which one I should use.
-------------------------------------------------------
printf("%s",rfile);
if((execv("/usr/bin/od", "/hiren/filem.c"))<0)
perror("exec");
-------------------------------------------------------
I was using the aboce code, but it is giving bad address, I am getting
why this error is coming.
| |
| Barry Margolin 2005-10-27, 2:48 am |
| In article <1130386429.709271.6520@g49g2000cwa.googlegroups.com>,
"friend.05@gmail.com" <hirenshah.05@gmail.com> wrote:
> I making a program in C.
>
> I want to read a file using "od -c" command, I was trying to use exec
> for the same.
>
> But I don't have much idea about exec. Can anyone suggest how to use
> for od command and also of six exec function which one I should use.
>
> -------------------------------------------------------
> printf("%s",rfile);
> if((execv("/usr/bin/od", "/hiren/filem.c"))<0)
> perror("exec");
> -------------------------------------------------------
>
> I was using the aboce code, but it is giving bad address, I am getting
> why this error is coming.
I just answered this in comp.unix.programmer. programming questions
belong in that group, not comp.unix.questions. But if you really *must*
post to multiple groups, please cross-post properly.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
|
|
|