首页> 开发问题 >后端问题 后端问题
[vs code] 运行go包提示:Code is already running!
作者:小萝卜 2023-03-29 【 Vscode 】 浏览 1856
简介[vs code] 运行go包提示:Code is already running!上次运行程序的还没结束,需要等待其结束。
问题描述
Code is already running!
出现原因
上次运行程序的还没结束,需要等待其结束。
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
extern char **environ;
int main(int atgc, char *argv[])
{
pid_t pid;
if ((pid = fork()) < 0)
{
return 0;
}
else if (pid == 0)
{
sleep(100);
printf("child\n");
}
else
{
sleep(100);
printf("parent\n");
}
}
例如对于这段代码,有一个sleep(100),这次运行的程序还没有退出前,再点击运行,就会出现“Code is already running!”的提示。
解决办法

在 输出窗口 ,右键 ,stop code run ,解决问题
很赞哦! (1)
相关文章
- MYSQL5.7版本sql_mode=only_full_group_by报错解决方案
- MySQL: unrecognized service错误解决办法
- 网站打不开错误提示:ERR_CONTENT_DECODING_FAILED
- 语法解析错误: syntax error, unexpected 'unset' (T_UNSET)
- windows下mysql中文乱码, 配置解决方法
- laravel通过composer安装报错了The 'https://repo.packagist.org/p/laravel/laravel.json' file could not be downloaded: failed to open stream
- TP6报错致命错误: Cannot use object of type stdClass as array
- PHP查询报错, Fatal error: Allowed memory size of 134217728 bytes exhausted
- tp3.2插入数据时SQLSTATE[HY000]: General error
- 使用mysql_list_tables()方法报错