Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

При запуске программ из-под ConEmu printf() затирает ошибку WSAGetLastError() #1293

Open
ac opened this issue Oct 20, 2017 · 2 comments

Comments

@ac
Copy link

@ac ac commented Oct 20, 2017

Versions

ConEmu build: 170807 x64
OS version: Windows [Version 10.0.17017.1000] x64
Used shell version FAR 3.0.5066 x64

Problem description

При запуске программ из-под ConEmu printf() затирает ошибку WSAGetLastError() - если после вызова сокетной функции вызывать printf, то после него WSAGetLastError() вернёт ноль, хотя под другими консолями код ошибки сохраняется.

Steps to reproduce

#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32.lib")

int main(int argc, char * argv[]) {
	int UdpQ = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
	printf("ERROR_1=%i\n", WSAGetLastError());
	printf("ERROR_2=%i\n", WSAGetLastError());
	return 0;
}

Actual results

(под ConEmu)
ERROR_1=10093
ERROR_2=0

Expected results

(под обычной консолью)
ERROR_1=10093
ERROR_2=10093

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 20, 2017

Альфу проверяли?

Loading

@ac
Copy link
Author

@ac ac commented Oct 21, 2017

В альфе 170910 наблюдаю ту же проблему.

Loading

Maximus5 pushed a commit that referenced this issue Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants