[Prev][Next][Index][Thread]

fork & exec.



Hi all,

How can I know if the command in the exec function was Ok?


I want to backup a file by tar to /dev/fd0 by exec,
If there is no disk in the drive I get no error from the exec because the exec passed OK,
but on the xterm I get cannot open /dev/fd0 : no such device or address, which means that tar 
failed.

The exec return -1 on error, but there is no error because the tar was found, but the tar 
failed.

How can I know that the tar failed?

int id;
int ExecId


Follow-Ups: