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

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 20, 2017

Owner

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

Owner

Maximus5 commented Oct 20, 2017

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

@ac

This comment has been minimized.

Show comment
Hide comment
@ac

ac Oct 21, 2017

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

ac commented Oct 21, 2017

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

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