JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... char * optstring ); extern char * optarg ; extern int optind , opterr , optopt ; #include < getopt.h > int getopt_long(int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); int getopt_long_only( ... int argc , char * const argv[] , const char * optstring , const struct option * longopts , int * longindex ); glibc 向けの機能検査マ ... getopt_long (), getopt_long_only (): _GNU_SOURCE 説明 getopt () 関数はコマンドライン引数を解釈する。 getopt () がとる引数 argc と argv は、それぞれプログラムの起動時に main () 関数に渡された引数の個数と配列である。 argv の要素のうち '-' で始まるもの ... ... い。 このコンテキストが将来 ( setcontext (3) または swapcontext () によって) 有効にされると、関数 func が呼ばれ、 引数として argc 以降の整数 ( int ) 引数の列が渡される。 呼び出し者は argc にこれらの引数の個数を指定しなければならない。 この関数が戻ると、 ... ポインター型が同じ大きさであるアーキテクチャーでは (x86-32 はその例であり、両方の型とも 32 ビットである)、 makecontext () の argc 以降の引数としてポインターを渡してもうまく動くかもしれない。 しかしながら、このようにすると、移植性は保証されず、 標準に従 ... if (swapcontext(&uctx_func2, &uctx_func1) == -1) handle_error("swapcontext"); printf("func2: returning\n"); } int main(int argc, char *argv[]) { char func1_stack[16384]; char func2_stack[16384]; if (getcontext(&uctx_func1) == -1) handle_error("getcon ... ... い。 このコンテキストが将来 ( setcontext (3) または swapcontext () によって) 有効にされると、関数 func が呼ばれ、 引数として argc 以降の整数 ( int ) 引数の列が渡される。 呼び出し者は argc にこれらの引数の個数を指定しなければならない。 この関数が戻ると、 ... ポインター型が同じ大きさであるアーキテクチャーでは (x86-32 はその例であり、両方の型とも 32 ビットである)、 makecontext () の argc 以降の引数としてポインターを渡してもうまく動くかもしれない。 しかしながら、このようにすると、移植性は保証されず、 標準に従 ... if (swapcontext(&uctx_func2, &uctx_func1) == -1) handle_error("swapcontext"); printf("func2: returning\n"); } int main(int argc, char *argv[]) { char func1_stack[16384]; char func2_stack[16384]; if (getcontext(&uctx_func1) == -1) handle_error("getcon ... ... g=%s" > \ /proc/sys/kernel/core_pattern # exit $ sleep 100 ha\ # type control-backslash Quit (core dumped) $ cat core.info argc=5 argc[0]=</home/mtk/core_pattern_pipe_test> argc[1]=<20575> argc[2]=<UID=1000> argc[3]=<GID=100> argc[4]=<sig=3> Total by ... #include < limits.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #define BUF_SIZE 1024 int main(int argc, char *argv[]) { ssize_t nread, tot; char buf[BUF_SIZE]; FILE *fp; char cwd[PATH_MAX]; /* Change our current working direc ... ; if (fp == NULL) exit(EXIT_FAILURE); /* Display command-line arguments given to core_pattern pipe program */ fprintf(fp, "argc=%d\n", argc); for (int j = 0; j < argc; j++) fprintf(fp, "argc[%d]=<%s>\n", j, argv[j]); /* Count bytes in standard input ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。