Skip to content

Instantly share code, notes, and snippets.

@bg1bgst333
Last active November 28, 2025 23:55
Show Gist options
  • Select an option

  • Save bg1bgst333/2dcc21b84643ab748ba1 to your computer and use it in GitHub Desktop.

Select an option

Save bg1bgst333/2dcc21b84643ab748ba1 to your computer and use it in GitHub Desktop.
system#system
/* ヘッダファイルのインクルード */
#include <stdio.h> /* 標準入出力 */
#include <stdlib.h> /* 標準ユーティリティ */
#include <sys/types.h> /* 派生型 */
#include <unistd.h> /* UNIX標準 */
/* main関数の定義 */
int main(void){
/* 変数の宣言 */
pid_t pid; /* getpidでプロセスIDを取得し, pidに格納. */
/* プロセスIDの取得 */
pid = getpid(); /* getpidでプロセスIDを取得し, pidに格納. */
printf("pid = %d\n", pid); /* printfでpidを出力. */
/* 1分間(60秒間)待つ. */
sleep(60); /* sleepで60秒間休止. */
/* systemを呼ぶ直前. */
printf("system before.\n"); /* "system before."を出力する. */
/* プロセスの実行. */
system("./system_sub 123 abc xyz"); /* systemで"./system_sub"を引数"123", "abb", "xyz"として実行.(systemにより, system_mainのプロセスとは別にsystem_subのプロセスが生成される.) */
/* 1分間(60秒間)待つ. */
sleep(60); /* sleepで60秒間休止. */
/* プログラムの終了 */
return 0;
}
/* ヘッダファイルのインクルード */
#include <stdio.h> /* 標準入出力 */
#include <sys/types.h> /* 派生型 */
#include <unistd.h> /* UNIX標準 */
/* main関数の定義 */
int main(int argc, char *argv[]){
/* 変数の宣言 */
pid_t pid; /* プロセスIDを格納するpid_t型変数pid. */
int i; /* ループ用変数i */
/* プロセスIDの取得 */
pid = getpid(); /* getpidでプロセスIDを取得し, pidに格納. */
printf("pid = %d\n", pid); /* printfでpidを出力. */
/* コマンドライン引数の出力. */
for (i = 0; i < argc; i++){ /* argcの数繰り返す. */
/* argvの出力. */
printf("argv[%d] = %s\n", i, argv[i]); /* argvの各要素を出力. */
}
/* 1分間(60秒)待つ. */
sleep(60); /* sleepで60秒間休止. */
/* プログラムの終了. */
return 0;
}
@Giangpro89
Copy link

Chào mừng bạn đến với bảng nhớ tạm của Gboard, bất kỳ văn bản nào bạn sao chép sẽ được lưu tại đây.

@Torvicemm
Copy link

Chào mừng bạn đến với bảng nhớ tạm của Gboard, bất kỳ văn bản nào bạn sao chép sẽ được lưu tại đây.

@Superleah06
Copy link

My phone was diagnosed with a problem

@Superleah06
Copy link

Fr and you can you send it for us if I don't know 😕 🤷 🤪 😌 🙂 🙃 so you don't know how much you are in your life with your family or family to do that for me to do something else for me and you can have a good day with my phone and my friend and you can have a great day at home with you guys are the one that can get the rest in your life with your family or your mouth and you will always love to be with me when I see your mouth in the morning my phone was born and the other day was a bit late but no worries but no worries but no worries I'll let me check out if I have a chance or something like this for you or not to you can easily find a place that is a very good job to get the best of the Security and service in my company and you will get a good job on your investment and you will get the best

@Superleah06
Copy link

Leah m guyer 1204 1 so I'm not applicable for that one place to do it with you 😉 😏 😜 I don't have to go with you can easily get the best for me to get a chance of it for you and your mouth in your mouth in the morning my phone was born and the other day was a bit late but I was born in the middle of a few hours 😉 and was trying to get 😉 to get the money back from me and I will let 😉 know when we can do the things we have in your house and you will always be able for the entirety to do something to do with your family and be able for the entirety to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment