-
操作系统:Win10 \begin{codeblock}[language=Python]
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main() {
pid_t pid;
switch ((pid = fork())) {
case -1:
printf("fork failed\n");
break;
case 0:
/* child calls exec */
execl("/bin/ls", "ls", "-l", (char*)0);
printf("execl failed\n");
break;
default:
/* parent uses wait to suspend execution until child finishes */
wait((int*)0);
printf("is completed\n");
break;
}
return 0;
}
\end{codeblock} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
您提供的代码可以正常插入。建议检查其他地方是否有问题。 |
Beta Was this translation helpful? Give feedback.
-
嗯嗯对的,就是如果太长可能放不进去了,比如这段(一开始没放是怕放上来会影响查重率,不过已经查重完了,管它呢) def is_img(ext): #函数定义:输入contours与计算某一个曲率点数,选取contours中最大的边界,根据点数计算曲率,输出C0为最长边界的曲率值 #导入图片路径,注意像素值为整数 |
Beta Was this translation helpful? Give feedback.
您提供的代码可以正常插入。建议检查其他地方是否有问题。