私はCプログラムでuse byを使用していますip
。system("ip link set eth0 up")
私は失敗したときに呼び出された関数が返した(終了)したものを返し、system
返すことを知っています。-1
たとえば、システムにeth0がない場合は返されます256
。これらの値の定義はどこにありますかip
?
ifconfig
いくつかの例を見てください戻りコード:
Return Code Description
0 The command completed successfully.
4 The command completed successfully, but a warning condition was detected.
8 The command was not specified correctly.
12 An error was encountered.
16 An unexpected condition was encountered.
ベストアンサー1
~によると人々 8 IP次の終了コードは次のとおりですip
。
終了ステータス:
0 = 成功
1 = 構文エラー
2 = カーネルエラー