我在程序中使用system()调用,即在c库中。对于第9次调用,它在第10次调用后返回“0”(零),它返回256.我不知道它是什么意思。请有人帮助我。以下是代码系统问题()调用
int returnValue= system("/system/bin/cat /dev/graphics/fb0 > /tmpdata/Screenshot/screenshot.bin");
我在程序中使用system()调用,即在c库中。对于第9次调用,它在第10次调用后返回“0”(零),它返回256.我不知道它是什么意思。请有人帮助我。以下是代码系统问题()调用
int returnValue= system("/system/bin/cat /dev/graphics/fb0 > /tmpdata/Screenshot/screenshot.bin");
根据this man page处理与一般的unix命令cat
线,一个错误代码> 0仅仅意味着发生了错误。
The following exit values shall be returned: 0 All input files were output successfully. >0 An error occurred.
你system()
呼叫尝试concatentate两个文件,因此,或许是有空间的问题或可能的源文件不存在。
你也不妨看看最近的一些source code for Android cat(cat.c),它给出了猫内引发错误的东西的一些指示。
Android的哪个版本? – 2010-11-18 10:16:11
Android 2.1(Eclair)。 – Kantesh 2010-11-18 10:38:02