IP機能終了コード

IP機能終了コード

私はCプログラムでuse byを使用していますipsystem("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 = カーネルエラー

おすすめ記事