AW: AW: tar returns error 256?
Alessandro Rubini
rubini-list at gnudd.com
Wed Jun 10 12:06:42 UTC 2009
> How did you conclude that it's not busybox/tar's fault?
It may or may not. We have not enough information.
> system("tar ..."); should normally return 0,
No. system("tar ..."); will return 64, with a message "invalid option -- ."
on stderr.
As reported, 256 is not "exit(256)" on tar side. I see
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
so 256 means exit(1). Nothing strange. Example:
rudo$ ./busybox tar cf /tmp/out /tmp/unexists 2> /dev/null
rudo$ echo $?
1
> We do not have enough info yet to know, but the fact that
> tar file gets created tells that tar was successfully exec'ed.
It depends on what "..." really is.
If it is "tar c /files > outfile.tar" the output is created by the
shell before calling exec.
> Does it ever happen when you run the very same tar command from
> command line?
But, first of all, Which command?
/alessandro
More information about the busybox
mailing list