我在程序中使用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